-
-
Notifications
You must be signed in to change notification settings - Fork 238
fix: redirect user to original path after user cancel oauth login #1285
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: redirect user to original path after user cancel oauth login #1285
Conversation
📝 WalkthroughWalkthroughThis change adds error handling to the OAuth callback endpoint for the atproto authentication flow. When the OAuth provider returns an Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
3 similar comments
📝 WalkthroughWalkthroughThis change adds error handling to the OAuth callback endpoint for the atproto authentication flow. When the OAuth provider returns an Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
📝 WalkthroughWalkthroughThis change adds error handling to the OAuth callback endpoint for the atproto authentication flow. When the OAuth provider returns an Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
📝 WalkthroughWalkthroughThis change adds error handling to the OAuth callback endpoint for the atproto authentication flow. When the OAuth provider returns an Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| const error = query.error | ||
|
|
||
| // user cancelled explicitly | ||
| if (error === 'access_denied') { |
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.
| const error = query.error | |
| // user cancelled explicitly | |
| if (error === 'access_denied') { | |
| // user cancelled explicitly | |
| if (query.error === 'access_denied') { |
Description
This pr improves the authentication experience by handling cases where a user explicitly cancels the authorization request on the Bluesky/ATProto login page.
Previously, clicking "Cancel" would result in 401 "Handle not provided in query" error. This change introduces a check for the
access_deniederror and gracefully redirects the user back to their original location using the validated path stored in the session cookie.