Skip to content

Conversation

eideroliveira
Copy link

@eideroliveira eideroliveira commented Apr 22, 2025

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.

  • Authentication/Login:
    • Add login-code flow (send/validate): new URLs, handlers (sendLoginCodeURL, validateLoginCodeURL), page (loginCodePageFunc), errors, hooks, middleware whitelist, and LoginCodeValidated claim.
    • Introduce UserLoginCoder/UserLoginCodeSender interfaces and UserLoginCode model for code generation/consumption and phone lookup.
    • Export SetFailCodeFlash and SetNoticeFlash; update all call sites.
  • i18n:
    • Refactor message storage to map[language.Tag]map[ModuleKey]Messages; update registration and retrieval logic.
  • UI/Localization:
    • Add login-code page and i18n strings across en_US, zh_CN, ja_JP.
    • Bump Vuetify CSS fallback from 3.6.14 to 3.7.18.
  • Misc:
    • Add package x; minor middleware and builder tweaks.

Written by Cursor Bugbot for commit fd68716. This will update automatically on new commits. Configure here.

@danni-cool danni-cool requested a review from xuxinx May 13, 2025 03:52
@xuxinx xuxinx requested review from molon and removed request for xuxinx May 13, 2025 03:54
cursor[bot]

This comment was marked as outdated.

@theplant-ci theplant-ci added size/XL and removed size/M labels Sep 4, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a 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)
}
// }
Copy link

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.

Fix in Cursor Fix in Web

log.Printf("user does not implement UserLoginCoder: %v", user)
SetFailCodeFlash(w, FailCodeSystemError)
return
}
Copy link

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.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants