Verify Google 2FA
POST/v1/auth/google-2fa-verification
Verify Google 2FA
The verify google 2fa endpoint is designed to authenticate users through Google's Two-Factor Authentication (2FA) system. It validates the user's credentials and verifies the 2FA code sent via email. Upon successful verification, it renews the user's session, generates new tokens, updates the last login timestamp, retrieves user details, and returns a JSON response containing user information along with access and refresh tokens. This endpoint ensures secure authentication by enforcing time-limited codes and validating them against stored values.
Request
- application/json
Body
required
email stringrequired
emailCode stringrequired
passwordHash stringrequired
sessionId stringrequired
Responses
- 200
- 400
- 401
- 500
Google 2FA verified
- application/json
- Schema
- Example (from schema)
Schema
accessToken stringrequired
createdAt date-timerequired
device stringrequired
deviceCreatedAt date-timerequired
email stringrequired
hpkePubKey binarynullable
id uuidrequired
lastLogin date-timenullable
lastTransaction date-timenullable
nickname stringrequired
refreshToken stringrequired
status stringrequired
{
"accessToken": "string",
"createdAt": "2024-09-25T19:42:12.372Z",
"device": "string",
"deviceCreatedAt": "2024-09-25T19:42:12.372Z",
"email": "string",
"hpkePubKey": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"lastLogin": "2024-09-25T19:42:12.372Z",
"lastTransaction": "2024-09-25T19:42:12.372Z",
"nickname": "string",
"refreshToken": "string",
"status": "string"
}
Invalid credentials
- text/plain
- Schema
Schema
string
Unauthorized
- text/plain
- Schema
Schema
string
Unexpected error
- text/plain
- Schema
Schema
string
Loading...