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.

When the user is logged out from Identity server from different window, it does not redirect the user to logout page.

See original GitHub issue

Package: @axa-fr/react-oidc-context

Senario: When the same application is opened on 2 different windows, and the user logs out of the 1st application, the second application does not log off the user. Instead it gets stuck at authenticating={Authenticating}. Expected result: The user should log out of the application even if it’s on different window.

Here are few logs on console. Screen Shot 2019-12-23 at 1 32 46 pm

ResponseValidator._processSigninParams: Response was error login_required should it expose some event and we can redirect user to logout/login uri.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dragos-roscacommented, Jul 17, 2020

Hope this helps: If you look at your screenshot you will see that the UserManager still finds the user in it’s storage … so as a work around i just added a callback to the userSignedOut event (you have events in returned by your useReactOidc() hook or just find the events in userManager) and in that callback I just called userManager.removeUser() and it seems to work.

    const { events } = useReactOidc();
    useEffect(() => {
        if (!events) return
        events.addUserSignedOut(addUserSignedOut);
        return () => {
            events.removeUserSignedOut(addUserSignedOut);
        };
    }, [events])

and something like:

const addUserSignedOut = () => {
    const userManager = getUserManager()
    userManager.removeUser();
}

I’m still looking for an official solution!

1reaction
carmenbreezycommented, Mar 11, 2021

Hi there, has there been an official fix for this issue yet? Currently experiencing the same thing on version 3.1.6.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication: User is not redirected after logging out of ...
The user remains on the "You are logged out" page. The behavior may be observed when using Windows authentication on Internet explorer only...
Read more >
IdentityServer4 - Redirect to MVC client after Logout
I want user to be redirect back to MVC client after getting Logged out from IdentityServer. Right now user has to click link...
Read more >
Returning to the Client - Duende IdentityServer Documentation
The logout page typically should not directly redirect the user to this URL. Doing so would skip the necessary front-channel notifications to clients....
Read more >
Redirect Users After Logout - Auth0
You can redirect users to a specific URL after they logout. You will need to register the redirect URL in your tenant or...
Read more >
Authenticate users using an Application Load Balancer
If the IdP does not have a logout endpoint, the request goes back to the client logout landing page, and the login process...
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