Repository navigation
Conversation
onValidateEmail treated every failed POST /auth/login/account-verify as "user not found", so a 419 (session cookie not sent back, e.g. Safari blocking cookies), a 5xx or a network error switched the page to "Create an account for:" and pushed existing users to register, which also fails with 419. - classify the failure by status: only a 404 sets an explicit account_not_found flag; 419 shows a session-expired/cookies-blocked message with a Reload page button; 429 keeps its message; anything else shows a generic message with a Try again button - getSignUpSignInTitle() now depends on account_not_found instead of errors.email being non-empty - show the session-expired message when POST /auth/login/otp or the resend verification email returns 419 - add unit tests for the status classification
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/openstackid/openapi/pr-178/ This page is automatically updated on each push to this PR. |
ref: https://app.clickup.com/t/86bcjd796
Problem
onValidateEmailtreated every failedPOST /auth/login/account-verifyas "user not found". A 419 (session cookie not sent back, e.g. Safari or an MDM profile blocking cookies), a 5xx or a network error switched the page to "Create an account for:" and pushed existing users to register, which also fails with 419, leaving them stuck.Changes
resources/js/login/error_handling.js):account_not_foundflag (sign-up title, register / one-time code options).getSignUpSignInTitle()depends onaccount_not_foundinstead oferrors.emailbeing non-empty.emitOtpAction(POST /auth/login/otp) andresendVerificationEmailshow the session-expired message on a 419.Tests
npx jest resources/js/login: 10 unit tests for the status classification.LoginPage(it renders on import and isn't exported), and the locked / unverified branches.Manual check
Load
/auth/login, delete the session cookie, submit an existing email: the page must not show "Create an account for:".Summary by CodeRabbit