post_mfa_setup
POST /mfa/setup
Setup MFA Method
Initialize the setup process for a multi-factor authentication method. This endpoint prepares the MFA setup and returns the necessary configuration data.
TypeScript Client Library
// Note: This endpoint doesn't have a direct client method in the provided TypeScript client
// You would need to use the generic makeRequest method:
// this.makeRequest<any>('mfa/setup', 'POST', {
// mfaType: 'GOOGLE_AUTH',
// email: '[email protected]',
// deviceInfo: { name: 'iPhone 12', type: 'mobile' }
// });Code Samples
# You can also use wget
curl -X POST https://backend.flashback.tech/mfa/setup \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d '{
"mfaType": "GOOGLE_AUTH",
"email": "[email protected]",
"deviceInfo": {
"name": "iPhone 12",
"type": "mobile"
}
}'POST https://backend.flashback.tech/mfa/setup HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: application/json
Authorization: Bearer {access-token}
{
"mfaType": "GOOGLE_AUTH",
"email": "[email protected]",
"deviceInfo": {
"name": "iPhone 12",
"type": "mobile"
}
}Request Body
mfaType
string
true
Type of MFA method to setup
string
false
Email address (required for magic links)
deviceInfo
object
false
Device information for passkeys
Body parameter
Example responses
200 Response
400 Response
500 Response
Responses
Response Schema
Status Code 200
» success
boolean
false
none
Indicates if the request was successful
» data
object
false
none
MFA setup configuration data
Status Code 400
» success
boolean
false
none
Indicates if the request was successful
» error
string
false
none
Error message describing the validation issue
Status Code 500
» success
boolean
false
none
Indicates if the request was successful
» error
string
false
none
Error message describing the issue
Enumerated Values
» mfaType
GOOGLE_AUTH
Google Authenticator TOTP
» mfaType
MAGIC_LINK
Magic link email verification
» mfaType
PASSKEY
WebAuthn passkey authentication
Last updated
Was this helpful?