Auth
This page describes all endpoint in Auth Controller
GET
User profile retrieved successfully
Unauthorized
GET /auth/me HTTP/1.1
Host:
Accept: */*
{
"id": 1,
"email": "user.email@gmail.com",
"firstName": "John",
"lastName": "Doe",
"roles": [
"User"
],
"isTwoFactorEnable": true,
"photo": "https://example.com/photo.jpg"
}POST
Authenticates a user, verifies their captchaToken, and returns tokens for session management along with their two-factor authentication status.
captcha_tokenSuccessful authentication
Invalid captcha token or authentication failure
POST /auth/sign-in HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"credentials": {
"email": "user.email@gmail.com",
"password": "user12345"
},
"captchaToken": "captcha_token"
}{
"accessToken": "access_token",
"refreshToken": "refresh_token",
"isTwoFactorEnable": true
}user.email@gmail.comuser12345JohnDoeUser successfully registered
Invalid input or user already exists
Account was deleted
POST /auth/sign-up HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"email": "user.email@gmail.com",
"password": "user12345",
"firstName": "John",
"lastName": "Doe"
}{
"accessToken": "access_token",
"refreshToken": "refresh_token",
"isTwoFactorEnable": true
}google_oauth_tokenSuccessful authentication
To proceed, please sign up.
POST /auth/google/sign-in HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"token": "google_oauth_token"
}{
"accessToken": "access_token",
"refreshToken": "refresh_token",
"isTwoFactorEnable": true
}google_oauth_tokenUser successfully registered
OAuth provider account already exists
Account was deleted
POST /auth/google/sign-up HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"token": "google_oauth_token"
}{
"accessToken": "access_token",
"refreshToken": "refresh_token",
"isTwoFactorEnable": true
}facebook_oauth_tokenSuccessful authentication
To proceed, please sign up.
POST /auth/facebook/sign-in HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"token": "facebook_oauth_token"
}{
"accessToken": "access_token",
"refreshToken": "refresh_token",
"isTwoFactorEnable": true
}facebook_oauth_tokenUser successfully registered
OAuth provider account already exists
Account was deleted
POST /auth/facebook/sign-up HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"token": "facebook_oauth_token"
}{
"accessToken": "access_token",
"refreshToken": "refresh_token",
"isTwoFactorEnable": true
}valid_refresh_tokenTokens refreshed successfully
Unauthorized
POST /auth/refresh-token HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"refreshToken": "valid_refresh_token"
}{
"accessToken": "new_access_token",
"refreshToken": "new_refresh_token",
"isTwoFactorEnable": true
}user.email@gmail.comPassword reset link sent successfully
{"message":"Password restoration email send","description":"Check your email for further instructions on how to change your password."}User is not registered
POST /auth/forgot-password HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"email": "user.email@gmail.com"
}{
"message": "Password restoration email send",
"description": "Check your email for further instructions on how to change your password."
}valid_restore_tokenToken is valid
trueValidation failed
POST /auth/validate-restore-token HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 31
{
"token": "valid_restore_token"
}truevalid_invitation_tokenToken is valid
trueValidation failed
POST /auth/validate-invitation-token HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"token": "valid_invitation_token"
}truenewSecurePassword123someRandomToken123Password restored successfully
{"message":"Password restored successfully","description":"Your password has been changed successfully."}Validation failed
Internal server error
POST /auth/restore-password HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"newPassword": "newSecurePassword123",
"token": "someRandomToken123"
}{
"message": "Password restored successfully",
"description": "Your password has been changed successfully."
}New password for the user
newSecurePassword123Token for registration completion
someRandomToken123First name of the user
JohnLast name of the user
DoeInvitation finished successfully
{"message":"Invitation finished successfully","description":"Your account has been activated and your password has been set successfully."}Validation failed
Internal server error
POST /auth/finish-invitation HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"newPassword": "newSecurePassword123",
"token": "someRandomToken123",
"firstName": "John",
"lastName": "Doe"
}{
"message": "Invitation finished successfully",
"description": "Your account has been activated and your password has been set successfully."
}team_idTeam changed successfully
Invalid team ID
Forbidden. This error occurs when the user want to change the team in demo mode or not a member of that team.
POST /auth/change-team HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"teamId": "team_id"
}{
"accessToken": "new_access_token",
"refreshToken": "new_refresh_token",
"isTwoFactorEnable": true
}Last updated