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

set id_token_hint in search params when logging out if available #1773

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/auth0-session/client/edge-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export class EdgeClient extends AbstractClient {
const { id_token_hint, post_logout_redirect_uri, ...extraParams } = parameters;
const auth0LogoutUrl: URL = new URL(urlJoin(as.issuer, '/v2/logout'));
post_logout_redirect_uri && auth0LogoutUrl.searchParams.set('returnTo', post_logout_redirect_uri);
id_token_hint && auth0LogoutUrl.searchParams.set('id_token_hint', id_token_hint);
auth0LogoutUrl.searchParams.set('client_id', this.config.clientID);
Object.entries(extraParams).forEach(([key, value]: [string, string]) => {
if (value === null || value === undefined) {
Expand Down
1 change: 1 addition & 0 deletions src/auth0-session/client/node-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export class NodeClient extends AbstractClient {
const parsedUrl = new URL(urlJoin(issuer.metadata.issuer, '/v2/logout'));
parsedUrl.searchParams.set('client_id', config.clientID);
post_logout_redirect_uri && parsedUrl.searchParams.set('returnTo', post_logout_redirect_uri);
id_token_hint && parsedUrl.searchParams.set('id_token_hint', id_token_hint);
Object.entries(extraParams).forEach(([key, value]) => {
if (value === null || value === undefined) {
return;
Expand Down
Loading