fix: redirect user to original path after user cancel oauth login#1285
fix: redirect user to original path after user cancel oauth login#1285danielroe merged 2 commits intonpmx-dev:mainfrom
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.
| 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.