fix(frontend): Add flag to check auto-redirect#629
Conversation
📝 WalkthroughWalkthroughThe login-page component is enhanced with a guard mechanism to prevent multiple OAuth auto-redirects. A ref tracks redirect state, resets on OAuth errors, and the effect dependency array is optimized to use the mutate function reference. A loose equality check is converted to strict equality. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 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 |
|
@steveiliop56 No problem ! Just in case, I realized about this issue with the |
|
Yes it was one of the many issues in the alpha/nightly lol. |
The useEffect hook had a dependency on oauthMutation, which changes every time the mutation runs. This caused the effect to re-run indefinitely, creating hundreds of requests to the OIDC provider, in this case
/api/oauth/url/pocketid.This is happening only in
tinyauth:nightlySummary by CodeRabbit