Skip to content

[v3] Standardised authentication errors #86

Description

Right now the authentication error objects returned sometimes have a 'name' property with what is essentially the error code, and sometimes a 'code' property. This makes switching over the error in a reducer quite complicated as they're not consistent e.g 'action.payload.name' vs 'action.payload.code'.
Also it seems as though firebase are moving towards descriptive text errors as the 'code' rather than the old numerical codes:
https://firebase.google.com/docs/reference/js/firebase.auth.Error
So getting these in line would be really good for reference purposes.
Cheers!

Activity

  1. SamMatthewsIsACommonName commented on Oct 26, 2016

    @SamMatthewsIsACommonName
    Author
  2. davecoates commented on Nov 7, 2016

    @davecoates

    This may help as a reference mapping to the error code strings used in the web API:

    https://github.com/davecoates/rn-firebase-bridge/blob/master/ios/FirebaseBridgeAuth.swift

    Unfortunately Android doesn't seem to use the full list of error codes so you are limited to a subset of those

  3. SamMatthewsIsACommonName commented on Nov 10, 2016

    @SamMatthewsIsACommonName
    Author

    Great thanks Dave!

    On 8 Nov 2016, at 11:44, Dave Coates notifications@github.com wrote:

    This may help as a reference mapping to the error code strings used in the web API:

    https://github.com/davecoates/rn-firebase-bridge/blob/master/ios/FirebaseBridgeAuth.swift https://github.com/davecoates/rn-firebase-bridge/blob/master/ios/FirebaseBridgeAuth.swift
    Unfortunately Android doesn't seem to use the full list of error codes so you are limited to a subset of those

    —
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub #86 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AUV0p8FMSXx9RxvCQbcvC8whd_Ur7J-gks5q76mygaJpZM4KhLX4.

  4. Salakar commented on Nov 19, 2016

    @Salakar
    Collaborator

    This is something @Ehesp and I want to sort on v3, we've already standardised a lot of the auth module to match the web api and can be seen on my fork or the v3 branch.

    The plan is move these into the same format as web api, e.g. returning an error code of auth/disabled-user

  5. added this to the v3 milestone on Nov 19, 2016
  6. changed the title [-]Standardised authentication errors[/-] [+][v3] Standardised authentication errors[/+] on Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions