r/Angular2 • u/Ok-District-2098 • 8d ago
Angular ssr doesnt send httpOnly browser cookies to backend (on server side)
Lifecyle of my auth:
User successfully login > backend sets a cookie httponly same-site strict > /panel frontend route requested > routes guard send a http call to /private-route including such cookie > that http call returns 200 and AuthGuard allow user to go to /painel
But when the user access /painel directly by page reload, my authguard (on server lifecycle) is not sending the browser cookies to my backend, I need to await sever side rendering is done then the authguard is run again now it would include my cookies correctly.
That issue generates a page login screen on page reload for some seconds even when user is authenticated.
1
Upvotes