-
Notifications
You must be signed in to change notification settings - Fork 2
fix: adjust proxy auth method logout logic #89
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
Conversation
📝 WalkthroughWalkthroughLogout now conditionally POSTs to an exported Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant App as Frontend App
participant Auth as Auth Proxy/Service
participant Router as Browser Router
Client->>App: invoke logout()
App->>App: check noAuth && authMethod === "proxy" && authLogoutURL
alt proxy logout path
App->>Auth: POST authLogoutURL
Auth-->>App: 200/response
App->>Router: navigate("/login")
else fallback
App->>Router: navigate(logoutPage or /login)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)frontend/src/utils/auth.ts (2)
🪛 GitHub Check: Lint Frontendfrontend/src/utils/auth.ts[warning] 140-140: 🔇 Additional comments (2)
✏️ Tip: You can disable this entire section by setting Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@frontend/src/utils/auth.ts`:
- Around line 133-143: The proxy logout branch (authMethod === "proxy" &&
authLogoutURL !== "") currently fire-and-forgets the fetch and immediately
navigates, so add a .catch() to the fetch call to log any failures (use
console.error or the existing logger) and keep the function synchronous (do not
make logout() async) so callers/handlers are unaffected; also add a brief
comment by the router.push explaining why the reason param is not passed in this
Hostinger-specific flow for clarity.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
frontend/src/utils/auth.ts
🔇 Additional comments (1)
frontend/src/utils/auth.ts (1)
5-11: LGTM!Clean import addition for the new
authLogoutURLconstant.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
00dcc65 to
e5336fc
Compare
e5336fc to
91f2618
Compare
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.