Reputation: 2546
I have an Hydra SSO Server
, an OIDC Provider
and a Resource Server Website
.
Resource Server Website
, if no authentication info can be found, a guard will redirect the user to Hydra SSO Server
and a authorization-code
oauth2 flow will start. Either it will automatically log the user if Hydra SSO Server
session can be found, either it will redirect the user back to the login page.Resource Server Website
, the guard does not redirect the user to Hydra SSO Server
. In this case we don't know if the user is already logged (Hydra SSO Server
session is active).As I would like to put user info on the navbar
no matter which page he visits, what is the best approach to check user session on Hydra SSO Server
?
I did not find any endpoint for validating the user hydra session without redirection.
If I need to start with an oauth2 redirect against hydra when the website loads, is this a correct approach ?
Upvotes: 2
Views: 253