API Documentation
Backend Services
- Authentication
- Email and Password
- Passwordless
- OAuth
- WebAuthn
- Anonymous
- MFA
- User
- POSTSign Out
- Storage
GraphQL
- AI
Client Libraries
- JavaScript
- React
- Next.js
- Vue
MFA
Sign In TOTP
Sign In with a Time-based One-Time Password (TOTP)
POST
/
signin
/
mfa
/
totp
curl --request POST \
--url https://local.auth.nhost.run/v1/signin/mfa/totp \
--header 'Content-Type: application/json' \
--data '{
"otp": "<string>",
"ticket": "mfaTotp:e08204c7-40af-4434-a7ed-31c6aa37a390"
}'
{
"mfa": {
"ticket": "<string>"
},
"session": {
"accessToken": "<string>",
"accessTokenExpiresIn": 123,
"refreshToken": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"user": {
"activeMfaType": "totp",
"avatarUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultRole": "user",
"displayName": "John Smith",
"email": "john.smith@nhost.io",
"emailVerified": false,
"id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"isAnonymous": false,
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"phoneNumber": "<string>",
"phoneNumberVerified": false,
"roles": [
"me",
"user"
]
}
}
}
Body
application/json
The body is of type object
.
Response
200
application/json
User successfully authenticated
The response is of type object
.
curl --request POST \
--url https://local.auth.nhost.run/v1/signin/mfa/totp \
--header 'Content-Type: application/json' \
--data '{
"otp": "<string>",
"ticket": "mfaTotp:e08204c7-40af-4434-a7ed-31c6aa37a390"
}'
{
"mfa": {
"ticket": "<string>"
},
"session": {
"accessToken": "<string>",
"accessTokenExpiresIn": 123,
"refreshToken": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"user": {
"activeMfaType": "totp",
"avatarUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"defaultRole": "user",
"displayName": "John Smith",
"email": "john.smith@nhost.io",
"emailVerified": false,
"id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"isAnonymous": false,
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"phoneNumber": "<string>",
"phoneNumberVerified": false,
"roles": [
"me",
"user"
]
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.