Skip to content

Multi-tenant OAuth2 login (authorization-code flow) from Single Page Applications #175

Answered by ch4mpy
lucapino asked this question in Q&A
Discussion options

You must be logged in to vote

Edit: my preceding answer probably better covers the subject.

The solution you request sticks to the Angular app being a public client. This is bad. Have you solely read the Final Recommendation from the 1st post in the thread I linked several times already? To be very clear your Angular app should not have access to tokens (which means that it should not be able to send tokens with request) and the OAuth2 client configuration resolution should not be done in Angular.

Appart from that:

  • it is generally considered a good practice to have a public landing page for many reasons (UX, search engine indexers, ...)
  • you can expose expose Angular assets publicly, have Angular app initialize, fetch…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@lucapino
Comment options

Comment options

You must be logged in to vote
3 replies
@lucapino
Comment options

@ch4mpy
Comment options

Answer selected by ch4mpy
@lucapino
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants