Verify Email OTP
Verify email OTP code for 2FA during login.
Requires the 2FA cookie set by /auth/sign-in/email.
Body
required
application/json
- Type: stringcoderequired
6-digit OTP code from email
- Type: booleantrust
Device Trust this device for 30 days
Responses
- application/json
- 401
Invalid OTP code or missing 2FA cookie
Request Example for post/auth/two-factor/verify-otp
curl https://api.gpcn.com/v1/auth/two-factor/verify-otp \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"code": "123456",
"trustDevice": true
}'
{
"user": {},
"session": {}
}.png)