Wrong type definition for UserRecord
See original GitHub issueDescribe your environment
- Operating System version: any
- Library version: 5.8.1
- Firebase Product: admin
Describe the problem
The types definitions of UserRecord
is inconsistent with the documentation. For instance, the displayName
and photoUrl
may be null
but in the interface UserRecord
in the type definition file they are required
Steps to reproduce:
Just compare the documentation with the type definition
Relevant Code:
interface UserRecord {
uid: string;
email: string;
emailVerified: boolean;
displayName: string; // SHOULD BE string?
phoneNumber: string;
photoURL: string; // SHOULD BE string?
disabled: boolean;
metadata: admin.auth.UserMetadata;
providerData: admin.auth.UserInfo[];
passwordHash?: string;
passwordSalt?: string;
customClaims?: Object;
tokensValidAfterTime?: string;
toJSON(): Object;
}
I didn’t compared all the types, just these two that relevant to my code.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Firebase Admin SDK - UserRecord class - Google
Emulator Suite · Authentication · Realtime Database · Firestore · Storage · ML · Hosting · Cloud Functions.
Read more >How to Handle Firebase Auth exceptions on flutter
The only issue I see with this answer is that the "error" in the catch doesnt always contains a "code", meaning that your...
Read more >10050379: GWCHECK error codes - Support
17 Host or User record in message database has a NULL "Please report" message pointer ... 62 Error reading system document type definition...
Read more >Lookup Filters - Salesforce Help
Improve user productivity and data quality with lookup filters. Lookup filters are administrator settings that restrict the valid values and lookup dialog ......
Read more >Salesforce Error: "ID Value of Incorrect Type"
Introduction. If you are receiving the Salesforce Error "ID Value of Incorrect Type" this means that an ID being sent to Salesforce is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This has been fixed in https://github.com/firebase/firebase-admin-node/pull/421
Typings now indicate the optional fields correctly. The documentation has also been updated to indicate
(string or undefined)
where it matters.Sorry I have been swamped lately. I will try to resolve this soon.