Skip to content

enhancement: show a clear error when Apple login returns no email#177

Merged
PierreVieira merged 1 commit into
mainfrom
enhancement/require-email-on-apple-login
Jun 18, 2026
Merged

enhancement: show a clear error when Apple login returns no email#177
PierreVieira merged 1 commit into
mainfrom
enhancement/require-email-on-apple-login

Conversation

@PierreVieira

Copy link
Copy Markdown
Member

What

When signing in with Apple, the user can choose not to share an email. With the "Allow users without an email" setting disabled on the Supabase Apple provider, the auth server rejects that sign-in — but the app previously surfaced it as the generic LoginError.GENERIC ("Something went wrong"), leaving the user with no idea what to do.

This adds a dedicated LoginError.EMAIL_REQUIRED and maps the auth server's "no email from provider" failure to it, so the login sheet now shows an actionable message asking the user to share their email and try again.

How

  • ThrowableToLoginErrorMapper now detects the provider-no-email auth failure (matching the GoTrue message "Error getting user email from external provider") and maps it to EMAIL_REQUIRED.
  • New LoginError.EMAIL_REQUIRED case, wired to a new login_error_email_required string (en / pt-rBR / es) and shown in the login bottom sheet.

Notes

  • This intentionally does not block Apple's "Hide My Email" — that still provides a working relay address, so it passes. Only the genuine no-email case is surfaced (rejecting the relay would violate App Store guidelines).
  • The detection currently relies on the GoTrue message string because the server returns a generic code for this case. A follow-up upstream change (supabase/auth#2584) adds a dedicated email_address_not_provided error code; once it ships and supabase-kt exposes it, the mapper can switch from message-matching to code-matching.

Release notes

Added a 1.16.0 entry in all three languages describing the clearer Apple sign-in error.

@PierreVieira PierreVieira added the enhancement New feature or request label Jun 18, 2026
@PierreVieira PierreVieira self-assigned this Jun 18, 2026
@PierreVieira PierreVieira merged commit 92fa509 into main Jun 18, 2026
1 check passed
@PierreVieira PierreVieira deleted the enhancement/require-email-on-apple-login branch June 18, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant