Skip to content

bug(gotrue): FailureReason matches english messages instead of error_code #409

Description

@fresh55

while migrating a backend to supabase i noticed GotrueException.Reason is guessed from the message text. FailureHint.DetectReason does Content.Contains("Invalid login"), Contains("email"), Contains("password") and so on, ordered by status code.

the auth server has returned a machine readable error_code in every error body since early 2024 (invalid_credentials, email_not_confirmed, refresh_token_not_found, user_already_exists, weak_password, ...). every other official client (js, swift, kotlin, python, flutter) reads that field and exposes it as a typed code.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions