feat: add UUID to login endpoint

This commit is contained in:
JustTemmie 2025-04-29 21:24:58 +02:00
parent dc0b18cfe1
commit 25b75bee87

View file

@ -8,8 +8,8 @@ Authenticates the user, and issues an access token for future requests.
## Request ## Request
| Name | Type | Description | | Name | Type | Description |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------- | |-------------|--------|-----------------------------------------------------------------------------------------------------------------|
| identifier | string | User's gorb ID. One of identifier and email **must** be implemented. | | identifier | string | User's gorb ID. One of identifier and email **must** be implemented. |
| email | string | User's email. One of identifier and email **must** be implemented. | | email | string | User's email. One of identifier and email **must** be implemented. |
| password | string | **Required**: The user's password (we need to figure out how exactly we're hashing + salting it on the client). | | password | string | **Required**: The user's password (we need to figure out how exactly we're hashing + salting it on the client). |
@ -28,7 +28,7 @@ Authenticates the user, and issues an access token for future requests.
## Responses ## Responses
| Status | Description | | Status | Description |
| ------ | ---------------------------------------------- | |--------|-------------------------------------------------|
| 200 | Authentication successful. | | 200 | Authentication successful. |
| 400 | The post request included poorly formated data. | | 400 | The post request included poorly formated data. |
| 403 | Part of the cridentials are invalid. | | 403 | Part of the cridentials are invalid. |
@ -38,9 +38,10 @@ Authenticates the user, and issues an access token for future requests.
### 200 ### 200
| Name | Type | Description | | Name | Type | Description |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- | |---------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------|
| access_token | string | **Required**: The access token that will be used for further authentication. | | access_token | string | **Required**: The access token that will be used for further authentication. |
| user_id | string | **Required**: The full gorb ID for the account. | | user_id | string | **Required**: The full gorb ID for the account. |
| uuid | string | **Required**: The account's UUID |
| expires_in | int | How many seconds until the token expires and is invalidated. | | expires_in | int | How many seconds until the token expires and is invalidated. |
| refresh_token | string | The refresh token that will be used to refresh the access token. Required for avoiding users having to log in after access token expiration. | | refresh_token | string | The refresh token that will be used to refresh the access token. Required for avoiding users having to log in after access token expiration. |
@ -48,6 +49,7 @@ Authenticates the user, and issues an access token for future requests.
{ {
"access_token": "35e404d160b0eac766cb85cf513670baa627d1e918c4813c3f099e31de300b63", "access_token": "35e404d160b0eac766cb85cf513670baa627d1e918c4813c3f099e31de300b63",
"user_id": "@radial_4740@gorb.app", "user_id": "@radial_4740@gorb.app",
"uuid": "dcb445f1-16e7-4cd9-ac19-af07acaeb865",
"expires_in": 86400, "expires_in": 86400,
"refresh_token": "d9ce91b7b643d5580ea605ad09ba1e13aef704c412194c00c592b96a62049587" "refresh_token": "d9ce91b7b643d5580ea605ad09ba1e13aef704c412194c00c592b96a62049587"
} }