-
Notifications
You must be signed in to change notification settings - Fork 416
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
Notification that checking session is initialized #686
Comments
@valdian thanks. I think we have this covered in the soon to be released version 11. @FabianGosebrink we have this added to the event service, right? Here's the branch with the latest changes: https://github.com/damienbod/angular-auth-oidc-client/tree/dev-version-11 or the master issue with the progress. Greetings Damien |
I am not sure I understand the requirement 100% correctly, but we have implemented a
HTH Fabian |
Maybe a stupid question but how do we know when a release will be made or is ready.. |
The question is not stupid at all. We are planning a release in the upcoming days. We are using the corona time a bit :) But we want it to be a little battle tested. Do you want to be an early tester? We might come back to you then... |
Thanks for your answers, I will try to describe more, what I am talking about. We have multiple Angular apps which use our Identity Server as an identity provider. We implemented single sign out and it works. When a user has App A in one browser tab and App B in another tab and he logs out in App A, then in app B, he is redirected to a "Session expired" page and the user data are removed from the browser. But also this situation can occur: I implemented this to prevent this situation: But as I said, I need to listen to the messages from the check session iframe in my code, since this library does not give me any confirmation, that the user is unchanged. My idea was, that the library could give such information. @FabianGosebrink I checked the code of CheckSessionService in dev-version-11 branch. The event you mentioned is thrown only when the message is 'changed', so it does not help me. If it was thrown also for the message 'unchanged', it would be what I need. Or should we handle this problem differently? I will be thankful for any ideas. |
We add this |
Hey @valdian , we just merged a PR #692 to provide the appropriate event. In version 11 you can do
|
Thanks! |
When my Angular app starts and there are valid tokens in the local storage, the app needs to know, whether the user from the token is still logged in to the identity provider (IdentityServer in my case) or not. And it needs to know it before it displays any content to the user. I am using session management. So in other words, the app needs to wait for the first message from the check session iframe and see whether its value "changed" or "unchanged".
To be able to do this, I need to listen to messages from the iframe in my code, but I think this notification could be provided by the library. OidcSecurityService could have a property
onCheckSessionSetup(): Observable<boolean>
, which would emittrue
after the first message is received from the iframe. After it emitstrue
, I could just check the value of thecheckSessionChanged
property of OidcSecurityService.What do you think about it? If you think, that it could be useful also for other developers, I can implement it and create a pull request. Or is there any other way how I could handle the situation described above?
The text was updated successfully, but these errors were encountered: