-
Notifications
You must be signed in to change notification settings - Fork 408
Adds multi-factor support for updateUser #706
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -639,6 +639,16 @@ declare namespace admin.auth { | |
| */ | ||
| tenantId?: string | null; | ||
|
|
||
| multiFactor?: { | ||
| enrolledFactors: Array<{ | ||
| uid: string; | ||
| phoneNumber: string; | ||
| displayName?: string; | ||
| enrollmentTime?: string; | ||
| factorId: string; | ||
| }>; | ||
| }; | ||
|
|
||
| /** | ||
| * @return A JSON-serializable representation of this object. | ||
| */ | ||
|
|
@@ -685,6 +695,16 @@ declare namespace admin.auth { | |
| * The user's photo URL. | ||
| */ | ||
| photoURL?: string | null; | ||
|
|
||
| multiFactor?: { | ||
| enrolledFactors: Array<{ | ||
| uid: string; | ||
| phoneNumber: string; | ||
| displayName?: string; | ||
| enrollmentTime?: string; | ||
| factorId: string; | ||
| }> | null; | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -1000,6 +1020,16 @@ declare namespace admin.auth { | |
| * to the tenant corresponding to that `TenantAwareAuth` instance's tenant ID. | ||
| */ | ||
| tenantId?: string | null; | ||
|
|
||
| multiFactor?: { | ||
| enrolledFactors: Array<{ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it make sense to reduce this duplication by introducing an interface? Like the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think we can define an interface for this. I can do it in the next PR. This is going to be modified and more documentation added later anyway. |
||
| uid: string; | ||
| phoneNumber: string; | ||
| displayName?: string; | ||
| enrollmentTime?: string; | ||
| factorId: string; | ||
| }>; | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
|
|
||
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.
Perhaps this is slightly more 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.
Hmm it is a bit more complicated as passing
request.mfa = {}will clear all existing second factors on the user.We should only pass that if the developers passing explicitly an empty array for
enrolledFactorsor null forenrolledFactors.