Add explanation for refresh_token to login/register tables

This commit is contained in:
SauceyRed 2025-04-28 23:44:14 +02:00
parent 1e6fd6754e
commit 1a5e864b01
Signed by: sauceyred
GPG key ID: 270B096EF6E9A462
2 changed files with 17 additions and 15 deletions

View file

@ -9,7 +9,7 @@ Authenticates the user, and issues an access token for future requests.
## Request
| Name | Type | Description |
|-------------|--------|----------------------------------------------------------------------------------------------------------------|
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| 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 |
| 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
| Status | Description |
|--------|------------------------------------------------|
| ------ | ---------------------------------------------- |
| 200 | Authentication successful |
| 400 | The post request included poorly formated data |
| 403 | Part of the cridentials are invalid. |
@ -37,11 +37,12 @@ Authenticates the user, and issues an access token for future requests.
### 200
| Name | Type | Description |
|--------------|--------|-----------------------------------------------------------------------------|
| 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 |
| expires_in | int | How many seconds until the token expires and is invalidated |
| Name | Type | Description |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| 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 |
| 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. |
```json
{