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

Pass custom callback URL to handleLogout() #5

Closed
jkjustjoshing opened this issue Sep 23, 2019 · 2 comments
Closed

Pass custom callback URL to handleLogout() #5

jkjustjoshing opened this issue Sep 23, 2019 · 2 comments

Comments

@jkjustjoshing
Copy link
Contributor

Describe the problem you'd like to have solved

I'd like to send a query parameter to the logout callback endpoint. For example, the current user's name, so I can put on the callback screen "John Smith has successfully logged out".

Describe the ideal solution

The idea in my mind right now is adding a 3rd parameter to handleLogout() with a custom callback URL. This could then get passed as a 2nd parameter to createLogoutUrl(). postLogoutRedirectUri could be used as a fallback if the dev doesn't manually set it.

Alternatives and current work-arounds

You could set a cookie/localStorage value and then read it after the redirect comes back.

@jkjustjoshing
Copy link
Contributor Author

I'm happy to submit a PR to make this change, once @sandrinodimattia confirms the idea is a good one.

@sandrinodimattia
Copy link
Member

Hij @jkjustjoshing, I would argue that this use case goes beyond the scope of this library. And it goes against the latest BCP:

   Authorization servers SHALL utilize exact matching of client redirect
   URIs against pre-registered URIs.  This measure contributes to the
   prevention of leakage of authorization codes and access tokens
   (depending on the grant type).  It also helps to detect mix-up
   attacks.

So I would suggest storing that message in a cookie or local storage.

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