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

Add logout options #877

Merged
merged 3 commits into from
Oct 21, 2022
Merged

Add logout options #877

merged 3 commits into from
Oct 21, 2022

Conversation

adamjmcgrath
Copy link
Contributor

📋 Changes

For example, to pass the federated logout param per https://auth0.com/docs/authenticate/login/logout/log-users-out-of-idps

handleLogout(req, res, { logoutParams: { federated: '' } });

📎 References

fixes #842

@adamjmcgrath adamjmcgrath added the review:small Small review label Oct 21, 2022
@adamjmcgrath adamjmcgrath requested a review from a team as a code owner October 21, 2022 15:21
@vercel
Copy link

vercel bot commented Oct 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
nextjs-auth0 ⬜️ Ignored (Inspect) Oct 21, 2022 at 3:21PM (UTC)

Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just have a question about the federated API.

* @example pass the federated logout param per https://auth0.com/docs/authenticate/login/logout/log-users-out-of-idps
*
* ```js
* handleLogout(req, res, { logoutParams: { federated: '' } });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be federated: true instead of an empty string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

federated=true would work, but Auth0 asks for https://YOUR_DOMAIN/v2/logout?federated - in its docs and this is a closer approximation (which also works)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ node -e "foo=new URL('https://YOUR_DOMAIN/v2/logout'); foo.searchParams.set('federated', ''); console.log(foo.toString())"
https://your_domain/v2/logout?federated=

@adamjmcgrath adamjmcgrath merged commit 853c7af into vNext Oct 21, 2022
@adamjmcgrath adamjmcgrath deleted the logout-opts branch October 21, 2022 17:09
@adamjmcgrath adamjmcgrath mentioned this pull request Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants