diff --git a/docs/api/Authentication.md b/docs/api/Authentication.md index 15a097d..8d1b613 100644 --- a/docs/api/Authentication.md +++ b/docs/api/Authentication.md @@ -27,7 +27,7 @@ All API calls require an access token. You can get an access token by making a P To interact with the API, add an `Authorization` header to your request with a value of `Bearer TOKEN` where `TOKEN` is your access token. ### Example: -!!! example "Get item `ce100`" +!!! example "Get item CE 100." ```js let access_token = "{{ example_access_token }}"; let queue = "ce"; @@ -46,14 +46,14 @@ To interact with the API, add an `Authorization` header to your request with a v ``` ## Refreshing Access Tokens -When you login, you'll receive an access token that expires 15 minutes after creation as well as two cookies needed to get a new access token: +When you login, you'll receive an access token that expires 15 minutes after creation as well as two cookies needed to get a new access token. Those cookies are: Name | Value | Path | Expiration | SameSite -- | -- | -- | -- | -- `refresh_token_cookie` | Your refresh token. | `/api/tokens/refresh` | 30 Days | Yes `csrf_refresh_token` | Additional verification data. (e.g. `{{ example_csrf_token }}`) | `/` | Session | Yes -The `refresh_token_cookie` is used to generate a new access token and will be sent back to the server with every request automatically. The `csrf_refresh_token` is used to verify the `refresh_token_cookie` and needs sent back as an `X-CSRF-TOKEN` header. +The `refresh_token_cookie` is used to generate a new access token and will be sent back to the server with every request automatically. It expires 30 days after login. The `csrf_refresh_token` is used to verify the `refresh_token_cookie` and needs sent back as an `X-CSRF-TOKEN` header. To refresh your access token, make a POST request to the `/api/tokens/refresh` endpoint with the value of the `csrf_refresh_token` cookies inside a `X-CSRF-TOKEN` header: