question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User logout at the end of the session

See original GitHub issue

Hi,

when activating monitorSession on UserManagerSettings an iframe is created to check the session and trigger events if the session is closed (it’s the OIDC Session Management). The AuthProvider hides the UserManager instance and therefore the events. It would be great to provide access to these events or to implement addUserSignedOut in order to enable Single Logout.

userManager.events.addUserSignedOut(async () => {
  console.log('OP session close: user signed out...')
  userManager.signoutRedirect()
})

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kherockcommented, Feb 8, 2022

I don’t see any harm in exposing events. I was actually considering deprecating the onSigninCallback, onRemoveUser, onSignoutRedirect, and onSignoutPopup props for the 2.0 release since you can replace all of them with a combination of the activeNavigator value and event listeners.

0reactions
pamapacommented, Feb 9, 2022

@ncarlier You are right, sorry for the non working idea…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logout (end-session) endpoint - Connect2id
Sends the end-user to log out of the OpenID provider. Parameters: [ id_token_hint ] Previously issued ID token to be used as hint...
Read more >
How to end all session when logout - Stack Overflow
This is my PHP code to end the session but when I click on the back button it still go back into my...
Read more >
How to implement a logout method in an Express application
A logout action only happens in the context of a session. So, we need to check if a session exists, and if so...
Read more >
Logout - Auth0
Describes how logout works with Auth0. ... You can log a user out of the Auth0 session and (optionally) from the identity provider...
Read more >
logoff | Microsoft Learn
Logging off a user from a session without warning can result in loss of data at the user's session. You should send a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found