Skip to content
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

Browser does not redirect back to app after logout (postLogoutRedirectUrl does not work) #564

Open
maysgar opened this issue Nov 1, 2024 · 1 comment

Comments

@maysgar
Copy link

maysgar commented Nov 1, 2024

When doing:

await _appAuth.endSession(EndSessionRequest(
          idTokenHint: idToken,
          postLogoutRedirectUrl: postLogoutRedirectUrl,
          serviceConfiguration: serviceConfiguration,
          externalUserAgent: externalUserAgent
          ));

The app triggers the browser and successfully logs out the user. However, after that, it does not automatically redirect the user back to the app, as it does with login.

I can see that in the example project the logout redirects the user to a website where there is a manual button to return to the app. In my case, I want to redirect the user directly to the app without having a button on the logout browser page.

Because of this, the only option is to have the user manually exit the browser to return to the app, which triggers AppAuth Error: The user cancelled the flow! and does not get information back on whether the logout was successful or not.

@MaikuB
Copy link
Owner

MaikuB commented Nov 6, 2024

The example app is behaving that way only because of the how the demo IdentityServer instance is configured. Have personally used this with Azure B2C where it redirects back to the app without needing the user to interact with a website. If you're not seeing a redirect happening then you will need to check if you have a configuration issue or that the server you're using follows the specification for the method to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants