Skip to content

Commit d83db33

Browse files
authored
docs: Revisions of 0.6.0 docs (#578)
1 parent 93591e3 commit d83db33

File tree

5 files changed

+7
-14
lines changed

5 files changed

+7
-14
lines changed

docs/content/2.configuration/3.nuxt-auth-handler.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ This page is only relevant to you, if you are using the `authjs`-provider.
1111
After following the [quick-start setup](/nuxt-auth/v0.6/getting-started/quick-start) and then optionally diving even deeper into the [`nuxt-auth` config inside your `nuxt.config.ts`](/nuxt-auth/v0.6/configuration/nuxt-config) you can begin defining providers and other options inside your `NuxtAuthHandler`.
1212

1313
For development, using the quick-start setup will already bring you quite far. For a production deployment, you will have to additionally:
14-
- set the `origin` by:
15-
1. exporting the `AUTH_ORIGIN`-environment variable _at runtime_ (higher precedence)
16-
2. setting the `origin`-key inside the `nuxt.config.ts` config _at build-time_ (lower precendence)
14+
- set the `origin` by exporting the `AUTH_ORIGIN`-environment variable _at runtime_
1715
- set a secret inside the `NuxtAuthHandler` config
1816

1917
## Creating the `NuxtAuthHandler`

docs/content/5.recipes/2.strapi.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For a production deployment, you will have to at least set the:
1414
1. Create a `.env` file with the following lines:
1515
```env
1616
// Strapi v4 url, out of the box
17-
ORIGIN=http://localhost:3000
17+
AUTH_ORIGIN=http://localhost:3000
1818
NUXT_SECRET=a-not-so-good-secret
1919
STRAPI_BASE_URL=http://localhost:1337/api
2020
```
@@ -28,9 +28,6 @@ export default defineNuxtConfig({
2828
// Default http://localhost:1337/api
2929
STRAPI_BASE_URL: process.env.STRAPI_BASE_URL,
3030
},
31-
auth: {
32-
origin: process.env.ORIGIN,
33-
},
3431
});
3532
```
3633

docs/content/5.recipes/6.laravel-passport.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ export default defineNuxtConfig({
6868

6969
```ts
7070
// ~/server/api/auth/[...].ts
71-
import {NuxtAuthHandler} from '#auth'
72-
const {passport} = useRuntimeConfig(); //get the values from the runtimeConfig
71+
import { NuxtAuthHandler } from '#auth'
72+
const { passport } = useRuntimeConfig(); //get the values from the runtimeConfig
7373

7474
export default NuxtAuthHandler({
7575
//...

docs/content/5.recipes/7.vercel-deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ In order to run the `nuxt-auth-example` the following environment variables are
2020

2121
When deploying `nuxt-auth` to Vercel you cannot set a random string as your nuxt secret. You must use a 32-bit generated secret. You can use [this](https://generate-secret.vercel.app/32) website to generate a custom secret.
2222

23-
### ORIGIN
23+
### AUTH_ORIGIN
2424

2525
In order to set the correct origin go into your Vercel project settings and navigate to the `Domains` tab. Once there you will all the assigned domains and their assigned environment (production, dev).
2626

27-
Copy the correct domain for every enviroment and assign the environment variables to match the correct environment.
27+
Copy the correct domain for every enviroment and assign the environment variables `AUTH_ORIGIN` to match the correct environment.
2828

2929
### Github_*
3030

docs/content/6.resources/5.errors.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ Read [the `NuxtAuthHandler` docs for more information and different options you
2727

2828
`AUTH_NO_ORIGIN` will appear as a warning message during development and be thrown as an error that stops the application during production. It is safe to ignore the development warning - it is only meant as a heads-up for your later production-deployment. `AUTH_NO_ORIGIN` occurs when the origin of your application was not set. `nuxt-auth` tries to find the origin of your application in the following order:
2929
1. Use the `AUTH_ORIGIN` environment variable if it is set,
30-
2. Use the `auth: { origin: 'https://your-cool-origin.com' }` config-value from the `nuxt.config.ts` if it is set,
31-
3. Development only: Determine the origin automatically from the incoming HTTP request
30+
2. Development only: Determine the origin automatically from the incoming HTTP request
3231

3332
The `origin` is important for callbacks that happen to a specific origin for `oauth` flows. Note that in order for (2) to work the `origin` already has to be set at build-time, i.e., when you run `npm run build` or `npm run generate` and it will lead to the `origin` being inside your app-bundle.
3433

35-
Read [the `nuxt.config.ts` docs for more information and different options you can use to set the `origin` at build- and at runtime](/nuxt-auth/v0.6/configuration/nuxt-auth-handler).

0 commit comments

Comments
 (0)