fix: when prompt none failed with no session redirect to login#450
fix: when prompt none failed with no session redirect to login#450DanielRivers merged 2 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/handlers/callback.ts`:
- Around line 40-42: The reauth_state parsing currently lets atob/JSON.parse
throw, causing the callback to fail instead of redirecting; wrap the parse of
reauth_state in a try/catch inside the callback handler and, on any error, call
and return redirectToLogin(routerClient) (instead of rethrowing) so malformed
reauth_state falls back to the login redirect; update the code paths around the
reauth_state parsing point in src/handlers/callback.ts (where atob/JSON.parse is
used) to swallow parse errors and invoke redirectToLogin(routerClient).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 33765aee-873a-4bcc-9386-c3ee6a259a80
📒 Files selected for processing (1)
src/handlers/callback.ts
Explain your changes
When prompt none is used, this caused callback to fail when no session existed.
Checklist
🛟 If you need help, consider asking for advice over in the Kinde community.