AuthenticationTwo-factor authentication
Verify an emailed code
POST
Verify two factor OTP
sessioncookie
gamma.session_token<token>The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.
application/json- body
code*stringThe otp code to verify. Eg: "012345"
trustDevice?booleanTwo-factor OTP verified successfully
application/json- response
token*stringSession token for the authenticated session
user*The authenticated user object
Example Request
curl -X POST 'http://localhost:3000/api/auth/two-factor/verify-otp' \ -H 'Content-Type: application/json' \ -d '{ "code": "string"}'Example Response
{ "token": "string", "user": { "id": "string", "email": "user@example.com", "emailVerified": true, "name": "string", "image": "http://example.com", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}