enhancement: show a clear error when Apple login returns no email#177
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_REQUIREDand 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
ThrowableToLoginErrorMappernow detects the provider-no-email auth failure (matching the GoTrue message"Error getting user email from external provider") and maps it toEMAIL_REQUIRED.LoginError.EMAIL_REQUIREDcase, wired to a newlogin_error_email_requiredstring (en / pt-rBR / es) and shown in the login bottom sheet.Notes
email_address_not_providederror 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.