question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong type definition for UserRecord

See original GitHub issue

Describe 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:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
hiranya911commented, Dec 21, 2018

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.

0reactions
bojeil-googlecommented, Oct 31, 2018

Sorry I have been swamped lately. I will try to resolve this soon.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found