Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Firebase_Auth] Exception with different message (Android and iOS) #8066

Closed
yamauchieduardo opened this issue Feb 10, 2022 · 3 comments
Closed
Labels
good first issue Good for newcomers plugin: auth resolution: wontfix This will not be worked on type: documentation Improvements or additions to documentation type: enhancement New feature or request

Comments

@yamauchieduardo
Copy link

yamauchieduardo commented Feb 10, 2022

When a user try to authenticate the phone number with a wrong SMS code, an exceptions is throw.

But the exception message is different by platform (Android and iOS).

Using Firebase Auth in Android:

FirebaseAuthException(
    code: "invalid-verification-code",
    message:
    "The sms verification code used to create the phone auth credential is invalid. "
    "Please resend the verification code sms and be sure use the verification code "
    "provided by the user."
);

Using Firebase Auth in iOS:

FirebaseAuthException(
    code: "invalid-verification-code",
    message: 
    "The SMS verification code used to create the phone auth credential is invalid. "
    "Please resend the verification code SMS and be sure to use the verification code "
    "provided by the user."
);

I'm aways use the exception code to do something with the exception, but could be nice normalize these exceptions to record or analyze better using tools like analytics, etc.

firebase_auth: ^3.3.6

@yamauchieduardo yamauchieduardo added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Feb 10, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label Feb 11, 2022
@darshankawar
Copy link

@yamauchieduardo
I see below difference in the exception from what you shared:

  • sms and SMS
  • be sure use the verification code and be sure to use the verification code

Are these the differences you ought to point out and make them same across both ?

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Feb 11, 2022
@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Feb 11, 2022
@yamauchieduardo
Copy link
Author

yamauchieduardo commented Feb 11, 2022

Yes. I just notice these 2 differences @darshankawar

@darshankawar darshankawar added plugin: auth good first issue Good for newcomers type: documentation Improvements or additions to documentation type: enhancement New feature or request and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. type: bug Something isn't working labels Feb 14, 2022
@Lyokone
Copy link
Contributor

Lyokone commented Sep 28, 2022

Unifying Auth error code is discussed in this thread: #3273

We don't have control over error message since it depends on the underlying SDKs

@Lyokone Lyokone closed this as completed Sep 28, 2022
@Lyokone Lyokone added the resolution: wontfix This will not be worked on label Sep 28, 2022
@firebase firebase locked and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers plugin: auth resolution: wontfix This will not be worked on type: documentation Improvements or additions to documentation type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants