feat(identity): confirm the email address with a six-digit code from the message
This commit is contained in:
1 parent
c94434cd09
commit
d365a05c96
87 files changed
+4764
-224
No files matched your search
@@ -156,6 +156,29 @@ VerificationTokenExpired:
|
||||
code: verification_token_expired
|
||||
detail: Request a new verification link.
|
||||
trace_id: 4c5d6e7f-8a9b-4c0d-9e1f-2a3b4c5d6e7f
|
||||
VerificationCodeInvalid:
|
||||
summary: The code does not verify the email
|
||||
value:
|
||||
type: urn:lincodex:problem:verification_token_invalid
|
||||
title: Verification code is not valid
|
||||
status: 400
|
||||
code: verification_token_invalid
|
||||
detail: Check the code and the password, or request a new message.
|
||||
trace_id: 6e7f8a9b-0c1d-4e2f-9a3b-4c5d6e7f8a9b
|
||||
VerificationCodeMalformed:
|
||||
summary: The code is not six digits
|
||||
value:
|
||||
type: urn:lincodex:problem:validation_failed
|
||||
title: Request validation failed
|
||||
status: 400
|
||||
code: validation_failed
|
||||
detail: One or more request fields are invalid.
|
||||
trace_id: 7f8a9b0c-1d2e-4f3a-8b4c-5d6e7f8a9b0c
|
||||
errors:
|
||||
- in: body
|
||||
pointer: /code
|
||||
code: invalid
|
||||
message: The value does not match the contract.
|
||||
VerificationTokenMalformed:
|
||||
summary: The token from the link is malformed
|
||||
value:
|
||||
|
||||
@@ -189,6 +189,24 @@ EmailVerificationFailed:
|
||||
$ref: ./examples.yml#/VerificationTokenInvalid
|
||||
validation_failed:
|
||||
$ref: ./examples.yml#/VerificationTokenMalformed
|
||||
EmailVerificationCodeFailed:
|
||||
description: >-
|
||||
The code does not verify the email. Code verification_token_invalid covers
|
||||
every refusal in the same shape: an unknown address, an address without an
|
||||
open code, a wrong code, an expired code, a wrong password, and a code that
|
||||
was burned after five failed attempts. Code validation_failed means the
|
||||
body does not match the contract, such as a code that is not six digits,
|
||||
and carries the pointer `/code`, `/email`, or `/password`. Nothing was
|
||||
changed in any case.
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: ./schemas.yml#/Problem
|
||||
examples:
|
||||
verification_code_invalid:
|
||||
$ref: ./examples.yml#/VerificationCodeInvalid
|
||||
validation_failed:
|
||||
$ref: ./examples.yml#/VerificationCodeMalformed
|
||||
InvalidCredentials:
|
||||
description: >-
|
||||
The email and password do not match an account; code
|
||||
|
||||
@@ -3729,6 +3729,30 @@ EmailVerificationRequest:
|
||||
minLength: 1
|
||||
maxLength: 128
|
||||
description: Password chosen for the registration that issued this token. It is sent in the request body and never appears in the verification link. The server applies NFKC normalization and the login length bounds, without reapplying the current new-registration blocklist.
|
||||
VerificationCode:
|
||||
type: string
|
||||
minLength: 6
|
||||
maxLength: 6
|
||||
pattern: ^[0-9]{6}$
|
||||
description: Six-digit code from the verification message, with leading zeros. It is request input only; the server keeps a keyed digest of it, never the code.
|
||||
EmailVerificationCodeRequest:
|
||||
type: object
|
||||
description: Address, the six-digit code from its verification message, and the password chosen for the registration that issued the code. The password is checked the same way as in EmailVerificationRequest.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- email
|
||||
- code
|
||||
- password
|
||||
properties:
|
||||
email:
|
||||
$ref: '#/EmailAddress'
|
||||
code:
|
||||
$ref: '#/VerificationCode'
|
||||
password:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 128
|
||||
description: Password chosen for the registration that issued the code. The server applies NFKC normalization and the login length bounds, without reapplying the current new-registration blocklist.
|
||||
EmailVerificationResult:
|
||||
type: object
|
||||
description: Result of a successful email verification. It does not start a session; the user signs in next and continues from `onboarding_step`.
|
||||
|
||||
@@ -207,6 +207,38 @@ schemas:
|
||||
sent in the request body and never appears in the verification link.
|
||||
The server applies NFKC normalization and the login length bounds,
|
||||
without reapplying the current new-registration blocklist.
|
||||
VerificationCode:
|
||||
type: string
|
||||
minLength: 6
|
||||
maxLength: 6
|
||||
pattern: "^[0-9]{6}$"
|
||||
description: >-
|
||||
Six-digit code from the verification message, with leading zeros. It is
|
||||
request input only; the server keeps a keyed digest of it, never the code.
|
||||
EmailVerificationCodeRequest:
|
||||
type: object
|
||||
description: >-
|
||||
Address, the six-digit code from its verification message, and the
|
||||
password chosen for the registration that issued the code. The password
|
||||
is checked the same way as in EmailVerificationRequest.
|
||||
additionalProperties: false
|
||||
required:
|
||||
- email
|
||||
- code
|
||||
- password
|
||||
properties:
|
||||
email:
|
||||
$ref: "#/schemas/EmailAddress"
|
||||
code:
|
||||
$ref: "#/schemas/VerificationCode"
|
||||
password:
|
||||
type: string
|
||||
minLength: 1
|
||||
maxLength: 128
|
||||
description: >-
|
||||
Password chosen for the registration that issued the code. The server
|
||||
applies NFKC normalization and the login length bounds, without
|
||||
reapplying the current new-registration blocklist.
|
||||
EmailVerificationResult:
|
||||
type: object
|
||||
description: >-
|
||||
|
||||
Reference in new issue
Block a user