-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(adapter-nextjs): server-side sign out not working with Firefox and Safari #14246
Conversation
extends AuthApiRequestHandlerInputBase { | ||
request: Request; | ||
handlerInput: CreateAuthRoutesHandlersInput; | ||
} | ||
interface HandleSignOutCallbackRequestForPagesHandlerInput | ||
extends Omit<AuthApiRequestHandlerInputBase, 'origin'> { | ||
extends AuthApiRequestHandlerInputBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this break anything? Although I don't know if anything can be done about it anyway if origin is needed even if it were
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a internal only function interface.
); | ||
|
||
return new Response( | ||
createOnSignInCompleteRedirectIntermediate({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it confusing to create a "signInComplete..."? Maybe the function should be renamed to createRedirectionIntermediary
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, I meant to change the function name, will update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Description of changes
When Amazon Cognito
/logout
endpoint redirects back to the/sign-out-callback
route the first time, let the handler sends client a 200 response with a intermediate page containing a redirect action to redirect to/sign-out-callback
again to ensure the token cookies to be sent to the Next.js server so the sign-out process can complete correctly.Details see corresponding in-code comments.
Issue #, if available
Description of how you validated changes
Checklist
yarn test
passesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.