Is your feature request related to a problem? Please describe.
Firebase admin's verifyIdToken may throw some errors that this module should probably handle. See this thread for a background discussion: #125
See a list of Firebase admin auth errors here:
https://firebase.google.com/docs/reference/node/firebase.auth.Error
Currently, we only handle auth/id-token-expired.
Describe the solution you'd like and how you'd implement it
When calling verifyIdToken, this module should probably handle the following errors:
auth/invalid-user-token: return an unauthed user
auth/user-token-expired: return an unauthed user
auth/user-disabled: return an unauthed user
auth/argument-error: call to refresh the ID token—however, we need to confirm this will address the kid claim error (see this comment for more info).
Is this a breaking change?
Yes, in the case developers are catching and handling these errors themselves.
Describe alternatives you've considered
Continue to ignore errors and let developers handle them. I can't think of a compelling reason not to handle any of the above errors.
Is your feature request related to a problem? Please describe.
Firebase admin's
verifyIdTokenmay throw some errors that this module should probably handle. See this thread for a background discussion: #125See a list of Firebase admin auth errors here:
https://firebase.google.com/docs/reference/node/firebase.auth.Error
Currently, we only handle
auth/id-token-expired.Describe the solution you'd like and how you'd implement it
When calling
verifyIdToken, this module should probably handle the following errors:auth/invalid-user-token: return an unauthed userauth/user-token-expired: return an unauthed userauth/user-disabled: return an unauthed userauth/argument-error: call to refresh the ID token—however, we need to confirm this will address thekidclaim error (see this comment for more info).Is this a breaking change?
Yes, in the case developers are catching and handling these errors themselves.
Describe alternatives you've considered
Continue to ignore errors and let developers handle them. I can't think of a compelling reason not to handle any of the above errors.