Skip to content

fix(auth): handle Auth0 password 400 without error code and strip email whitespace (#295) - #310

Merged
binarydev merged 2 commits into
mainfrom
fix/issue-295-auth0-password-400
Oct 25, 2026
Merged

binarydev merged 2 commits into
mainfrom
fix/issue-295-auth0-password-400

Conversation

@binarydev

Copy link
Copy Markdown
Owner

Fixes #295

Summary

  • Handle HTTP 400 on /u/login/password without data-error-code: When Auth0 rejects a password submission without rendering a field-level data-error-code attribute (e.g., accounts that have not yet reset their password / accepted updated terms following Generac's April 2026 security migration, or custom DB script rejections that render a #prompt-alert banner), _post_login_form now extracts the human-readable alert text from #prompt-alert / .ulp-input-error-message / .ulp-validator-error and raises InvalidCredentialsError instead of falling through to an uncaught RuntimeError with <!DOCTYPE html> in the log.
  • Recognize invalid-email-format and rate-limit error codes as credential errors: Added "email", "many-attempts", and "many_attempts" to _CREDENTIAL_ERROR_KEYWORDS.
  • Strip surrounding whitespace from email input: Normalizes the email address with .strip() in config_flow.py and auth.py so copy-paste whitespace doesn't trigger invalid-email-format on /u/login/identifier or cause a mismatch between the trimmed session username and the /u/login/password form submission.
  • Actionable error message: Updated the auth error string in translations/en.json to remind users who haven't reset their password since the April 2026 security update to sign in at app.mobilelinkgen.com first.

@binarydev
binarydev merged commit 956d357 into main Oct 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Password step 400 — Auth0 tenant migrated to new React Universal Login (ULP 1.125 / react-components 1.202, custom af-form)

1 participant