Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/api/blueprint/auth/email_verification.apib
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,28 @@ Sends the token to verify the account associated with the provided email id via
{
"message": "Verification email resent"
}

## Verify Email [/v1/auth/verify-email]

### Verify the email via auth token [POST]
Verifies the user email via token.

+ Request

+ Headers

Content-Type: application/json

+ Body

{
"data": {
"token": "your token"
}
}

+ Response 200 (application/json)

{
"message": "Email Verified"
}
9 changes: 9 additions & 0 deletions tests/hook_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4199,6 +4199,15 @@ def reset_password_patch(transaction):
db.session.commit()


@hooks.before("Email Verification > Verify Email > Verify the email via auth token")
def verify_email_from_token(transaction):
"""
POST /v1/auth/verify-email
:param transaction:
:return:
"""
transaction['skip'] = True

# ------------------------- Custom System Role -------------------------

@hooks.before("Custom System Roles > Custom System Roles Collections > List All Custom System Roles")
Expand Down