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

[🐛] [Auth] Error codes differentiation for language of environment #5164

Closed
1 of 5 tasks
ogous opened this issue Apr 13, 2021 · 1 comment
Closed
1 of 5 tasks

[🐛] [Auth] Error codes differentiation for language of environment #5164

ogous opened this issue Apr 13, 2021 · 1 comment
Labels
help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report

Comments

@ogous
Copy link

ogous commented Apr 13, 2021

Issue

After change android emulator system language to the Turkish for testing, I figure out that auth errors code strings return different according to system language settings in Android.

For example:
[auth/email-already-in-use] code string in English,
[auth/emaıl-already-ın-use] code string in Turkish.

So it creates unstable error handling situation. I checked history and found an already stated issue #3917, it turns out closed without solution, but problem is active.

I didn't check yet if its a problem for production or for real devices too. If it is, much more annoying situation becomes.

@mikehardy added that Auth module is not open source yet in 'firebase-android-sdk'. Not sure what can be done right now but it needs to be open, especially for who works in and develops for non-English languages.


Environment

Click To Expand

react-native info output:

 auth()
      .signInWithEmailAndPassword(email, password)
      .catch((e) => {
        switch (e.code) {
          case "auth/email-already-in-use":
         //This error code returns in English
           console.log(e.code);
            break;
          case "auth/emaıl-already-ın-use":
          //This error code returns in Turkish
           console.log(e.code);
            break;
        }
      });
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 11.2.0
  • Firebase module(s) you're using that has the issue:
    • Auth
  • Are you using TypeScript?
    • Y & 4.0.0


@ogous ogous added help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report labels Apr 13, 2021
@mikehardy
Copy link
Collaborator

This is duplicate of #3917, having another issue open does not add value. That issue has all the relevant discussion, it needs to be pursued with firebase-android-sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: needs-triage Issue needs additional investigation/triaging. type: bug New bug report
Projects
None yet
Development

No branches or pull requests

2 participants