-
Notifications
You must be signed in to change notification settings - Fork 694
OAuthService.logOut(true) doesn't log the user out from the identity server #9
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
Comments
Thx for this info. I've fixed this. Can you please retry it with the latest version from the npm repo and provide some feedback here. |
I will when it becomes available, here's something that maybe you can clarify for me. I want to get your latest change but I don't know what the version is:
What actually is the latest version? Why does my machine not see a later version (is there a command I need to run to refresh the packages npm sees?) ?? |
1.0.18 is the newest one. Now the github repo is also up to date. |
now 1.0.19 is the newest. Btw: My demo-instance of IDentityServer3 uses an older version. It doesn't seem to support this. Does it work with yours? |
That syntax for the 'post_logout_redirect_uri' as part of the logout query string is a good fix and that should work with our auth server, this issue is more about why there is even a boolean flag on the logOut method. If the flag is false, then the code will clear the ID token from the client (good!) but not log the user out of the ID server (not what I would expect but maybe there's a practical use for signing the user out of only the client app and not the ID server). If the flag is true then the client app is redirected to the identity server and logged out correctly there (my issue is that my ID server isn't redirecting back to the client app, but this is a misconfiguration on the ID server). Our ID server is ID3 |
I did this for two reasons:
|
Oh, that's a good feedback. Thx. Just updated the lib regarding this. |
** this.oauthService.logOut() not deleting access token on logout in implicit flow, on clicking login button user is able to access without requirement of user-name/password. ** constructor(
login() { logout() { Thanks ... |
@ajitesh-techsophy should your logout url be pointing to the auth server, e.g. |
Hi Sean, @OverRide
}
} @GetMapping(value = "/logout_sso")
|
@ajitesh-techsophy is your logout method redirecting to the auth server? What I observed is that signout without redirect will cause the user to log out of the application, but not log out of the identity server. As Manfred stated above, this is done so that the developer can choose if they want to log the user out of the single application, or log out of the entire identity server (i.e. every application that the user was logged in to). I was confused by this behavior initially but it does make sense. What you're looking for is to log your user out of all applications, so I believe you need to use the logout function that redirects to the identity server. |
@Sean-Brown as per what behaviour I want is that, for example some web app logged in using gmail, when he clicks on logout and then try to login back google asks for credentials(although user is still logged in gmail in next tab) if he does not click logout , google does not ask credentials. Thanks. |
@ajitesh-techsophy One more observation from my end is if I relogin after certain time in my case 2min it asks me for credentials, any relogin before 2min after logout will automatically complete the login flow with our credentials. |
Hey Guys - but what if you are signed into other apps with SSO using the same identity servies but not angular-oauth2-oidc. When you sign out of one of those apps it seems angular-oauth2-oidc does not honor and you are still signed in. So the SSO pattern seems broken here. Does anyone have this working? My identity server is the one from Microsoft. |
Hi @manfredsteyer , @Sean-Brown, Currently, I I`ve spent a lot of hrs on this but not able to found any fix for it. Kindly reply. |
I continue to encounter the issue on any browser. |
@mliotinoca This is a very old issue, I recommend opening a fresh one (referencing this one) with fresh steps to reproduce the issue, so we can investigate if it's a regression or a new kind of issue. |
HI @jeroenheijmans , @manfredsteyer , @Sean-Brown Any update on this issue. I am facing the same issue after logout if I ma try to login it automatically login. can you please help with this issue. |
Ahoy! For me specifically, please see #1280, I'm no longer actively involved in the issues list here. Either way, I think that if you have the same or a similar issue, I'd recommend opening a fresh one over commenting on a closed issue. Explain in the new issue how yours is different, or why you think the old one was incorrectly closed. That should gain a bit more views and traction from the community, I think? Good luck! |
In short: OAuthService.logOut(true) clears the identity token from the client application but does not log the user out of the identity server itself.
Angular2 application signs in to Identity Server via OIDC and is redirected back to the angular2 app. The angular2 app has a "logout" button which corresponds to OAuthService.logOut(). The parameter to logOut() is "noRedirectToLogoutUrl?: boolean" which, if true, clears the identity token from the angular2 application but not from the identity server, i.e. if the user tries to log in from the angular2 app, they are automatically signed in by the identity server and redirected back to the angular2 app. To me this is unexpected behavior: I want the user signed out of both the angular2 app AND the identity server.
If instead I call OAuthService.logOut(false) then the behavior is as expected except now the user needs to manually navigate back to the angular2 app (which I want to avoid).
The text was updated successfully, but these errors were encountered: