Skip to content

Commit fbdce22

Browse files
authored
🔄 synced local 'content/2.nuxt-auth/' with remote 'docs/content/' (#184)
Co-authored-by: sideborg <null>
1 parent 7535444 commit fbdce22

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

content/2.nuxt-auth/1.getting-started/3.quick-start.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ You can customize each endpoint to fit your needs or disable it by setting it to
9696
```
9797

9898
::alert{type="info"}
99-
See [configuration](/configuration/nuxt-config) for all options.
99+
See [configuration](/nuxt-auth/configuration/nuxt-config) for all options.
100100
::
101101

102-
103102
#### Sign In Example
104103

105104
To perform a sign in, all you need to do is calling the `signIn` function from `useAuth` composable and pass the credentials expected by your backend.

content/2.nuxt-auth/1.getting-started/5.getting-help.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ But don't worry! We're a friendly community of developers and we'd love to help.
1010
- Checkout the docs (page that you are currently viewing),
1111
- Search open & resolved issues and discussions: https://github.com/sidebase/nuxt-auth/v0.6/issues
1212
- Hop on Discord to ask us directly: https://discord.gg/VzABbVsqAc,
13-
- Open an issue to file a bug, ask for an enhancement or get an answer to a question: https://github.com/sidebase/nuxt-auth/v0.6/issues/new/choose
13+
- Open an issue to file a bug, ask for an enhancement or get an answer to a question: https://github.com/sidebase/nuxt-auth/issues/new/choose
1414

1515
We aim to follow the getting-help standards of the nuxt-project as described here and ask you to do the same when opening an issue or pinging us for help: https://nuxt.com/docs/community/getting-help#getting-help.
1616

content/2.nuxt-auth/2.configuration/2.nuxt-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ For the demo-app at https://nuxt-auth-example.sidebase.io we set the `origin` to
606606

607607
This is what tells the module where you added the authentication endpoints. By default this documentation recommends to use `/api/auth`, so that means that the module expects that all requests to `/api/auth/*` will be handled by the `NuxtAuthHandler`.
608608

609-
To statify this, you need to create a [catch-all server-route](https://nuxt.com/docs/guide/directory-structure/pages/#catch-all-route) at that location by creating a file `~/server/api/auth/[...].ts` that exports the `NuxtAuthHandler`, see more on this in the [Quick Start](/nuxt-auth/v0.6/next/getting-started/quick-start) or in the [`NuxtAuthHandler` documentation](/nuxt-auth/v0.6/next/configuration/nuxt-auth-handler)
609+
To statify this, you need to create a [catch-all server-route](https://nuxt.com/docs/guide/directory-structure/pages/#catch-all-route) at that location by creating a file `~/server/api/auth/[...].ts` that exports the `NuxtAuthHandler`, see more on this in the [Quick Start](/nuxt-auth/getting-started/quick-start) or in the [`NuxtAuthHandler` documentation](/nuxt-auth/configuration/nuxt-auth-handler)
610610

611611
If you want to have the authentication at another location, you should change the path, e.g., when setting the path-part of the `baseURL` to:
612612
- `path: "/api/_auth"` -> you need to add the authentication catch-all endpoints into `~/server/api/_auth/[...].ts` and this is where `nuxt-auth` will look

content/2.nuxt-auth/3.application-side/3.custom-sign-in-page.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ Then call the `mySignInHandler({ username, password })` on login instead of the
107107

108108
## Provider: `local or refresh`
109109

110-
The only way to use the local and refresh provider does not come with a pre-made login page, so you will have to build one yourself. To do so:
110+
As the `local` and `refresh` providers do not come with a pre-made login page, you will have to build one yourself. To do so:
111+
111112
1. Create the page, e.g., `pages/login.vue`
112113
2. Call the `signIn` method with the username and password your user has to enter on this page
113114
3. Disable the page protection, if you have the global middleware enabled

content/2.nuxt-auth/4.server-side/2.session-access-and-route-protection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default eventHandler(async (event) => {
1313
})
1414
```
1515

16-
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, internet call to the `GET /api/auth/sessions` endpoint, instead directly calling a pure JS-method.
16+
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.
1717

1818
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:
1919
```ts

content/2.nuxt-auth/5.recipes/1.index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ description: "`nuxt-auth` recipes on how to use Strapi, Directus, expand user se
33
---
44
# Overview
55

6-
The following pages contain some recipes for commonly asked patterns, questions and implementations. The recipes are mostly provided by the community and can serve as guidelines to implement something similar in your Nuxt 3 application. The recipes are not all tested through by the sidebase team. If you have any concerns, questions or improvement proposals or want to contribute a recipe yourself, we'd be very happy if you open an issue on our repository: https://github.com/sidebase/nuxt-auth/v0.6/issues/new/choose
6+
The following pages contain some recipes for commonly asked patterns, questions and implementations. The recipes are mostly provided by the community and can serve as guidelines to implement something similar in your Nuxt 3 application. The recipes are not all tested through by the sidebase team. If you have any concerns, questions or improvement proposals or want to contribute a recipe yourself, we'd be very happy if you open an issue on our repository: https://github.com/sidebase/nuxt-auth/issues/new/choose
77

88
Thanks to everybody who contributed so far ❤️

0 commit comments

Comments
 (0)