Auth service
Auth
10 endpoints.
POST
/api/v1/auth/forgot-passwordForgot Password
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Token | header | string | null | |
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonForgotPasswordRequest| Field | Type | Description |
|---|---|---|
emailrequired | string (email) |
Responses
200Successful Responseapplication/jsonany422Validation Error
Error bodies: HTTPValidationError. See Errors.
POST
/api/v1/auth/loginLogin
OAuth2 compatible token login, get an access token for future requests.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Token | header | string | null | |
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/x-www-form-urlencodedBody_login_api_v1_auth_login_post| Field | Type | Description |
|---|---|---|
grant_type | string | null | |
usernamerequired | string | |
passwordrequired | string (password) | |
scope | string | default "" |
client_id | string | null | |
client_secret | string | null |
Responses
POST
/api/v1/auth/logoutLogout
Request bodyrequired
application/jsonLogoutRequest| Field | Type | Description |
|---|---|---|
refresh_tokenrequired | string |
Responses
200Successful Responseapplication/jsonany422Validation Error
Error bodies: HTTPValidationError. See Errors.
POST
/api/v1/auth/refreshRefresh Token
Rotate refresh token.
Request bodyrequired
application/jsonRefreshTokenRequest| Field | Type | Description |
|---|---|---|
refresh_tokenrequired | string |
Responses
200Successful Responseapplication/jsonToken| Field | Type | Description |
|---|---|---|
access_tokenrequired | string | |
token_typerequired | string | |
refresh_tokenrequired | string |
422Validation Error
Error bodies: HTTPValidationError. See Errors.
POST
/api/v1/auth/resend-verificationResend Verification
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Token | header | string | null | |
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonResendVerificationRequest| Field | Type | Description |
|---|---|---|
emailrequired | string |
Responses
200Successful Responseapplication/jsonany422Validation Error
Error bodies: HTTPValidationError. See Errors.
POST
/api/v1/auth/reset-passwordReset Password
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Token | header | string | null | |
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonResetPasswordRequest| Field | Type | Description |
|---|---|---|
token | string | null | |
email | string (email) | null | |
otp | string | null | |
new_passwordrequired | string |
Responses
200Successful Responseapplication/jsonany422Validation Error
Error bodies: HTTPValidationError. See Errors.
POST
/api/v1/auth/signupCreate User
Create new user (201), or resend the code to a pending one (200).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Token | header | string | null | |
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonUserCreate| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
first_namerequired | string | |
last_namerequired | string | |
is_active | boolean | null | default true |
passwordrequired | string | |
invite_id | string | null |
Responses
201Successful Responseapplication/jsonUserResponse| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
first_name | string | null | |
last_name | string | null | |
is_active | boolean | null | default true |
idrequired | string (uuid) | |
role_idrequired | integer | |
created_atrequired | string (date-time) | |
updated_atrequired | string (date-time) | |
avatar_url | string | null |
422Validation Error
Error bodies: HTTPValidationError. See Errors.
GET
/api/v1/auth/verify-emailVerify Email Token
Parameters
| Name | In | Type | Description |
|---|---|---|---|
tokenrequired | query | string |
Responses
200Successful Responseapplication/jsonany422Validation Error
Error bodies: HTTPValidationError. See Errors.
POST
/api/v1/auth/verify-emailVerify Email Otp
Verify by the emailed six-digit code and sign the user in. 409 ALREADY_VERIFIED for a verified account, 401 ACCOUNT_INACTIVE for an inactive one, 400 INVALID_OTP otherwise.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Recaptcha-Token | header | string | null | |
X-Recaptcha-Key-Type | header | string | null |
Request bodyrequired
application/jsonVerifyEmailOtpRequest| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
otprequired | string |
/api/v1/auth/socialSocial Login
Social Login (Google). Verifies ID Token, finds/creates user, issues JWTs.
Request bodyrequired
application/jsonSocialLoginRequestproviderrequiredstringtokenrequiredstringResponses
200Successful Responseapplication/jsonTokenToken, expanded above.
422Validation ErrorError bodies:
HTTPValidationError. See Errors.