Skip to content

Commit

Permalink
Merge branch 'main' into option-to-remove-server
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser authored Jan 2, 2024
2 parents 4bc4de3 + 4f7433d commit e040030
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/content/1.getting-started/3.quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Note: The backend can also be in the same Nuxt 3 application, e.g., have a look
The linked example-implementation only serves as a starting-point and is not considered to be secure.
::

The backend musst accept a request with a body like:
The backend must accept a request with a body like:
```ts
{
username: '[email protected]',
Expand Down
32 changes: 18 additions & 14 deletions src/runtime/composables/refresh/useAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,26 @@ const signOut: SignOutFunc = async (signOutOptions) => {
rawToken.value = null
rawRefreshToken.value = null

const { path, method } = config.endpoints.signOut as {
path: string;
method:
| 'get'
| 'head'
| 'patch'
| 'post'
| 'put'
| 'delete'
| 'connect'
| 'options'
| 'trace';
const signOutConfig = config.endpoints.signOut
let res

if (signOutConfig) {
const { path, method } = config.endpoints.signOut as {
path: string;
method:
| 'get'
| 'head'
| 'patch'
| 'post'
| 'put'
| 'delete'
| 'connect'
| 'options'
| 'trace';
}
res = await _fetch(nuxt, path, { method, headers })
}

const res = await _fetch(nuxt, path, { method, headers })

const { callbackUrl, redirect = true } = signOutOptions ?? {}
if (redirect) {
await navigateTo(callbackUrl ?? (await getRequestURLWN(nuxt)))
Expand Down

0 comments on commit e040030

Please sign in to comment.