-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not staying authenticated after successfully authenticating #1434
Comments
Did you find any solution for authentik? |
No sir; dunno why what I posted wouldn't work. |
I just confirmed the same code does the same thing with Keycloak. This makes no sense to me. |
Hi |
My redirect Address was wrong. Now it works, it was redirectUri: 'http://localhost:4200/home', but with redirectUri: 'http://localhost:4200/login', works |
I also have to same problem. However i am using hash routing, i thought it might be because of that, and it did indeed fix the issue. Also remember to always update the redirect uri in the provider |
Describe the bug
I'm using Authentik as my identity provider, and can see that when I click login, it is in fact redirecting to Authentik and authenticating. However, it then redirects back to my app like its supposed to, but it doesn't retain state: it forgets it just authenticated. I feel like its reloading the SPA and in doing so is losing knowledge of the access token etc that it just got back from Authentik? It then tries to do it again, causing it to loop indefinitely, authenticating successfully each time and promptly forgetting it did so every time as well. Very confused.
AuthConfig:
Constructor of a service that is injected into my component:
Credit to https://www.youtube.com/watch?v=QV5YtczsorY for getting me this far. This seems like it should work. I feel like I must be missing something pretty simple but I can't figure out what it is.
The text was updated successfully, but these errors were encountered: