-
Notifications
You must be signed in to change notification settings - Fork 389
Defines the d.ts multi-factor related comments for reference generation. #766
New issue
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
Conversation
Adds missing multi-factor related claims to the `DecodedIdToken` interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a nit.
src/index.d.ts
Outdated
interface MultiFactorInfo { | ||
|
||
/** | ||
* The unique identifier of the enrolled second factor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This is the user's unique ID from the 2nd factor right? Perhaps make that a bit clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
interface MultiFactorInfo { | ||
|
||
/** | ||
* The user's unique ID of the enrolled second factor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ID of the enrolled second factor. This ID is unique to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
uid: string; | ||
|
||
/** | ||
* The optional display name for an enrolled second factor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The optional display name of the enrolled second factor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
enrollmentTime?: string; | ||
|
||
/** | ||
* The second factor type identifier. For SMS second factor, this is `"phone"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type identifier of the second factor. For SMS second factors, this is phone
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
@@ -639,14 +681,21 @@ declare namespace admin.auth { | |||
*/ | |||
tenantId?: string | null; | |||
|
|||
/** | |||
* The multi-factor related properties for the current user if available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user, if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
}>; | ||
|
||
/** | ||
* List of enrolled second factors on the current user record. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List of second factors enrolled with the current user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
}> | null; | ||
|
||
/** | ||
* The user's updated list of enrolled second factors. The provided list will always |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated list of enrolled second factors. The provided list overwrites the user's existing list of second factors. When null is passed, all of the user's existing second factors are removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
@@ -791,6 +915,19 @@ declare namespace admin.auth { | |||
*/ | |||
sign_in_provider: string; | |||
|
|||
/** | |||
* This is the type identifier or `factorId` of the second factor, provided the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type identifier..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
src/index.d.ts
Outdated
sign_in_second_factor?: string; | ||
|
||
/** | ||
* This is the `uid` of the second factor used to sign in, provided the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The uid
of..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Adds missing multi-factor related claims to the
DecodedIdToken
interface.