Skip to content

Commit

Permalink
fix: dead docs links
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser committed Jul 2, 2024
1 parent 3cf6dd4 commit 4012212
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guide/application-side/session-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const { status } = useAuth()

The current data inside the session. Options: `undefined` when no authentication attempt was made, `null` when the user is unauthenticated, `SessionData` when the user is authenticated.

To customize your `SessionData` see the following docs for [authjs](/guide/authjs/session-data) and [local / refresh]().
To customize your `SessionData` see the following docs for [authjs](/guide/authjs/session-data) and [local / refresh](/guide/local/session-data).

```vue
<script setup lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/authjs/server-side/session-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default eventHandler(async (event) => {
This is inspired by [the `getServerSession`](https://next-auth.js.org/tutorials/securing-pages-and-api-routes#securing-api-routes) of NextAuth.js. It also avoids an external HTTP `GET` request to the `/api/auth/sessions` endpoint, instead directly calling a pure JS-method.

:::warning Note:
If you use [Nuxts' `useFetch`](https://nuxt.com/docs/api/composables/use-fetch) from your app-components to fetch data from an endpoint that uses `getServerSession` or [`getToken`](/nuxt-auth/v0.6/server-side/jwt-access) you will need to manually pass along cookies as [Nuxt 3 universal rendering](https://nuxt.com/docs/guide/concepts/rendering#universal-rendering) will not do this per-default when it runs on the server-side. Not passing along cookies will result in `getServerSession` returning `null` when it is called from the server-side as no auth-cookies will exist. Here's an example that manually passes along cookies:
If you use [Nuxts' `useFetch`](https://nuxt.com/docs/api/composables/use-fetch) from your app-components to fetch data from an endpoint that uses `getServerSession` or `getToken` you will need to manually pass along cookies as [Nuxt 3 universal rendering](https://nuxt.com/docs/guide/concepts/rendering#universal-rendering) will not do this per-default when it runs on the server-side. Not passing along cookies will result in `getServerSession` returning `null` when it is called from the server-side as no auth-cookies will exist. Here's an example that manually passes along cookies:
```ts
const headers = useRequestHeaders(['cookie']) as HeadersInit
const { data: token } = await useFetch('/api/token', { headers })
Expand Down

0 comments on commit 4012212

Please sign in to comment.