Finishes enrolling a second factor for the user.
HTTP request
POST https://identitytoolkit.googleapis.com/v2/accounts/mfaEnrollment:finalize
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"idToken": string,
"displayName": string,
"tenantId": string,
"phoneVerificationInfo": {
object ( |
Fields | |
---|---|
idToken |
Required. ID token. |
displayName |
Display name which is entered by users to distinguish between different second factors with same type or different type. |
tenantId |
The ID of the Identity Platform tenant that the user enrolling MFA belongs to. If not set, the user belongs to the default Identity Platform project. |
phoneVerificationInfo |
Verification info to authorize sending an SMS for phone verification. |
Response body
If successful, the response body contains data with the following structure:
mfaEnrollment.finalize response.
JSON representation |
---|
{
"idToken": string,
"refreshToken": string,
"phoneAuthInfo": {
object ( |
Fields | |
---|---|
idToken |
ID token updated to reflect MFA enrollment. |
refreshToken |
Refresh token updated to reflect MFA enrollment. |
phoneAuthInfo |
Auxiliary auth info specific to phone auth. |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/identitytoolkit
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.