angular/universal

Angular universal & cookies based auth.

Avcajaraville opened this issue ยท 5 comments

๐Ÿš€ Feature request

What modules are relevant for this feature request?

  • builders
  • common
  • express-engine

Description

I am not quite sure about where to make this inquiry, but so far, I can't seem to find a way of handling cookies when using angular universal with cookies.

Prior versions, allowed me to hack my way, but that doesn't seem to be the case anymore.

It would be interesting to send cookies inside server requests when using universal.

The main use case is to be able to run angular applications, with a security layer and without the need for JS to be enabled. Think about performance or security.

Without JS on the client, this seems to be impossible at the moment.

Would love to get the advantages of cookies-based authentication and server-side rendering on protected routes. If there is no JS on the client, we can't use JWT or other mechanisms at the moment.

Describe the solution you'd like

I have no clue at all, not sure how this can be done.

What problem do you have? I was able to implement this using A16+Universal

I used to implement packages like ngx-cookies, cookies-backend-service, etc. but there must be an angular provided way to handle these things instead of trial and test of third-party packages.
By the way, the same packages didn't work with nest/ng-universal.

I went through this before and fixed it multiple ways, see if this helps you:
https://garage.sekrab.com/posts/authentication-in-angular-part-v-handling-ssr

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular-ssr.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.