Manage error from authentification

Hi,
How we can manage errors from firebase authentification ? https://firebase.google.com/docs/auth/ios/errors
When i catch error, i have this kind of message

Error: The email address is already in use by another account.
    at createErrorFromErrorData (d:\PartyStories\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:116)

Thanks.

Author: Fantashit

1 thought on “Manage error from authentification

  1. Hello,

    The errors returned to the JS side have been converted into the same format as the firebase web sdk errors: https://firebase.google.com/docs/reference/js/firebase.auth.Auth

    You just need to handle them the same way you would if you’re using the web sdk.

    A rough example in your case it would be something like:

    // https://firebase.google.com/docs/reference/js/firebase.auth.Auth#createUserWithEmailAndPassword
    firebase.auth()
        .createUserWithEmailAndPassword(email, password)
        .catch(error => {
            switch(error.code) {
                case 'auth/email-already-in-use':
                    // do something
                   break;
               // handle other codes ...
           }
        });

Comments are closed.

Manage error from authentification

Hi,
How we can manage errors from firebase authentification ? https://firebase.google.com/docs/auth/ios/errors
When i catch error, i have this kind of message

Error: The email address is already in use by another account.
    at createErrorFromErrorData (d:\PartyStories\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:116)

Thanks.

Author: Fantashit

3 thoughts on “Manage error from authentification

  1. Hello,

    The errors returned to the JS side have been converted into the same format as the firebase web sdk errors: https://firebase.google.com/docs/reference/js/firebase.auth.Auth

    You just need to handle them the same way you would if you’re using the web sdk.

    A rough example in your case it would be something like:

    // https://firebase.google.com/docs/reference/js/firebase.auth.Auth#createUserWithEmailAndPassword
    firebase.auth()
        .createUserWithEmailAndPassword(email, password)
        .catch(error => {
            switch(error.code) {
                case 'auth/email-already-in-use':
                    // do something
                   break;
               // handle other codes ...
           }
        });
  2. Pingback: 토렌트사이트

Comments are closed.

Manage error from authentification

Hi,
How we can manage errors from firebase authentification ? https://firebase.google.com/docs/auth/ios/errors
When i catch error, i have this kind of message

Error: The email address is already in use by another account.
    at createErrorFromErrorData (d:\PartyStories\node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:116)

Thanks.

Author: Fantashit

1 thought on “Manage error from authentification

  1. Hello,

    The errors returned to the JS side have been converted into the same format as the firebase web sdk errors: https://firebase.google.com/docs/reference/js/firebase.auth.Auth

    You just need to handle them the same way you would if you’re using the web sdk.

    A rough example in your case it would be something like:

    // https://firebase.google.com/docs/reference/js/firebase.auth.Auth#createUserWithEmailAndPassword
    firebase.auth()
        .createUserWithEmailAndPassword(email, password)
        .catch(error => {
            switch(error.code) {
                case 'auth/email-already-in-use':
                    // do something
                   break;
               // handle other codes ...
           }
        });

Comments are closed.