-
Notifications
You must be signed in to change notification settings - Fork 8
Exporting SetFailCodeFlash/SetNoticeFlash #455
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
base: master
Are you sure you want to change the base?
Conversation
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
// if r.Method == http.MethodGet { | ||
b.setContinueURL(w, r) | ||
} | ||
// } |
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.
Bug: Incorrect Method Handling Causes Login Redirection Issues
The if r.Method == http.MethodGet
check was commented out, causing setContinueURL
to be called for all HTTP methods. This saves non-GET requests (like form submissions) as continue URLs. After login, users are redirected to these action endpoints, which can lead to "Method Not Allowed" errors or lost form data, disrupting the user flow.
log.Printf("user does not implement UserLoginCoder: %v", user) | ||
SetFailCodeFlash(w, FailCodeSystemError) | ||
return | ||
} |
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.
Bug: Incomplete Login Handling Leaves Response Unfinished
Several new login code handling paths return early after setting a flash message without performing an HTTP redirect. This leaves the HTTP response incomplete and bypasses the deferred error handling logic, including the afterFailedToLoginHook
and the final redirect.
Those functions are useful when you have custom forms
Note
Introduce phone/WhatsApp login-code flow, export flash helpers, refactor i18n message storage API, add related pages/strings, and update Vuetify CSS version.
sendLoginCodeURL
,validateLoginCodeURL
), page (loginCodePageFunc
), errors, hooks, middleware whitelist, andLoginCodeValidated
claim.UserLoginCoder
/UserLoginCodeSender
interfaces andUserLoginCode
model for code generation/consumption and phone lookup.SetFailCodeFlash
andSetNoticeFlash
; update all call sites.map[language.Tag]map[ModuleKey]Messages
; update registration and retrieval logic.en_US
,zh_CN
,ja_JP
.3.6.14
to3.7.18
.x
; minor middleware and builder tweaks.Written by Cursor Bugbot for commit fd68716. This will update automatically on new commits. Configure here.