Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Rizzato committed Sep 19, 2024
1 parent 3c97925 commit 1bb9e4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/guide/local/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,14 @@ This follows the JSON Pointer standard, see its RFC6901 here: https://www.rfc-ed
#### `refreshResponseTokenPointer`

- **Type:** `string`
- **Default:** `'/token'`
- **Default:** `''`

How to extract the authentication-token from the refresh response.

E.g., setting this to `/token/bearer` and returning an object like `{ token: { bearer: 'THE_AUTH_TOKEN' }, timestamp: '2023' }` from the `refresh` endpoint will result in `nuxt-auth` extracting and storing `THE_AUTH_TOKEN`.

If not set, `token.signInResponseTokenPointer` will be used instead.

This follows the JSON Pointer standard, see its RFC6901 here: https://www.rfc-editor.org/rfc/rfc6901

#### `refreshRequestTokenPointer`
Expand Down
5 changes: 3 additions & 2 deletions src/runtime/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,15 @@ export interface ProviderLocal {
/**
* How to extract the authentication-token from the refresh response.
*

Check failure on line 260 in src/runtime/types.ts

View workflow job for this annotation

GitHub Actions / test-module

Trailing spaces not allowed
* If not set, `token.signInResponseTokenPointer` will be used instead.
*
*
* E.g., setting this to `/token/bearer` and returning an object like `{ token: { bearer: 'THE_AUTH_TOKEN' }, timestamp: '2023' }` from the `refresh` endpoint will
* result in `nuxt-auth` extracting and storing `THE_AUTH_TOKEN`.
*
* If not set, `token.signInResponseTokenPointer` will be used instead.
*

Check failure on line 266 in src/runtime/types.ts

View workflow job for this annotation

GitHub Actions / test-module

Trailing spaces not allowed
* This follows the JSON Pointer standard, see it's RFC6901 here: https://www.rfc-editor.org/rfc/rfc6901
*
* @default ''
* @example / Access the root of the refresh response object, useful when your endpoint returns a plain, non-object string as the token
*/
refreshResponseTokenPointer?: string
Expand Down

0 comments on commit 1bb9e4a

Please sign in to comment.