We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Typing of UserRecord.customClaims is Object. This is inconvenient to use typescript optional chaining in this case.
UserRecord.customClaims
Object
const user = await admin.auth().getUser(uid); if (user.customClaims?.roles?.coordinator) …
Produces the following error:
Property 'roles' does not exist on type 'Object'.ts(2339)
This contrasts to the DecodedIdToken which has [key: string]: any; indexer.
DecodedIdToken
[key: string]: any;
The text was updated successfully, but these errors were encountered:
Refines UserRecord.customClaims type.
1ec4002
Fixes #864
Refines UserRecord.customClaims type. (#866)
bc10b5e
3d4e2de
Fixes firebase/firebase-admin-node#864
3cc7658
ccc3f19
bojeil-google
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Environment
The problem
Typing of
UserRecord.customClaims
isObject
.This is inconvenient to use typescript optional chaining in this case.
Produces the following error:
This contrasts to the
DecodedIdToken
which has[key: string]: any;
indexer.The text was updated successfully, but these errors were encountered: