-
Notifications
You must be signed in to change notification settings - Fork 404
Closed
Labels
Description
[READ] Step 1: Are you in the right place?
- For issues related to the code in this repository file a Github issue.
- If the issue pertains to Cloud Firestore, read the instructions in the "Firestore issue"
template. - For general technical questions, post a question on StackOverflow
with the firebase tag. - For general Firebase discussion, use the firebase-talk
google group. - For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Operating System version: macOS
- Firebase SDK version: 10.0.0
- Firebase Product: auth
- Node.js version: 16
- NPM version: N/A
[REQUIRED] Step 3: Describe the problem
The following generic error is returned:
{
code: 'auth/internal-error',
message: 'An internal error has occurred. Raw server response: "{"error":{"code":400,"message":"USER_DISABLED","errors":[{"message":"USER_DISABLED","reason":"invalid","domain":"global"}]}}"'
}
Where as there is a auth/user-disabled
error code defined so should use that instead:
firebase-admin-node/src/utils/error.ts
Lines 724 to 727 in 94dd7c3
public static USER_DISABLED = { | |
code: 'user-disabled', | |
message: 'The user record is disabled.', | |
} |
So I'd expect a similar error to using .verfiyIdToken
for a disabled user:
{
code: 'auth/user-disabled',
message: 'The user record is disabled.'
}
Steps to reproduce:
- Create a user
- Sign in to a client SDK as the user and
.getIdToken
- Disable the user
- In Admin SDK try
.createSessionCookie(idToken, { expiresIn: 300000 })