Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/auth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,17 @@ export namespace admin.auth {
*/
auth_time: number;

/**
* The email corresponding to the user who the ID token belonged to, if available.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The email of the user to whom the ID token belonged, if available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

*/
email?: string;

/**
* Whether the email corresponding to the user who the ID token belonged to is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest "Whether or not the email of the user to whom the ID token belonged is verified, provided the user has an email."

Are the valid values true and false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, true or false. Done.

* verified or not, provided the user has an email.
*/
email_verified?: boolean;

/**
* The ID token's expiration time, in seconds since the Unix epoch. That is, the
* time at which this ID token expires and should no longer be considered valid.
Expand Down Expand Up @@ -494,6 +505,18 @@ export namespace admin.auth {
*/
iss: string;

/**
* The phone number corresponding to the user who the ID token belonged to,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest "The phone number of the user to whom the ID token belonged, if available."

Or -- can these be present tense "belongs?" That would be preferable if it is accurate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done on both.

* if available.
*/
phone_number?: string;

/**
* The photo URL corresponding to the user who the ID token belonged to,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest "The photo URL for the user to whom the ID token belonged..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* if available.
*/
picture?: string;

/**
* The `uid` corresponding to the user who the ID token belonged to.
*
Expand Down
4 changes: 4 additions & 0 deletions src/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export interface ListUsersResult {
export interface DecodedIdToken {
aud: string;
auth_time: number;
email?: string;
email_verified?: boolean;
exp: number;
firebase: {
identities: {
Expand All @@ -76,6 +78,8 @@ export interface DecodedIdToken {
};
iat: number;
iss: string;
phone_number?: string;
picture?: string;
sub: string;
tenant?: string;
[key: string]: any;
Expand Down