You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/advanced/deployment/self-hosted.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This guide will explain how you can self-host a Nuxt3 application running NuxtAu
6
6
7
7
When deploying the Auth.JS provider, the application must be informed what URL it is running at. This is to properly determine callback urls when navigating users to external OAuth providers. Depending on your setup, NuxtAuth allows you to set this value at either [**Runtime**](https://nuxt.com/docs/guide/going-further/hooks#app-hooks-runtime) or [**Buildtime**](https://nuxt.com/docs/guide/going-further/hooks#nuxt-hooks-build-time).
8
8
9
-
-**Runtime:** Set the `AUTH_ORIGIN` environment variable.
9
+
-**Runtime:** Set the `NUXT_AUTH_ORIGIN` environment variable.
10
10
-**Buildtime:** Set the `baseURL`-config key inside the `nuxt.config.ts`
-**port:** empty (implies `:80` for http and `:443` for https), :3000, :8888
17
17
18
-
An example of the `AUTH_ORIGIN` would be: `https://my-awesome-app.com`
18
+
An example of the `NUXT_AUTH_ORIGIN` would be: `https://my-awesome-app.com`
19
19
20
20
:::info Origin Order
21
21
When [attempting to determine the server origin](https://github.com/sidebase/nuxt-auth/blob/main/src/runtime/server/services/utils.ts#L11), NuxtAuth checks the available options in the following order:
22
-
-**Prio 1**: Using `AUTH_ORIGIN`
22
+
-**Prio 1**: Using `NUXT_AUTH_ORIGIN`
23
23
-**Prio 2**: Using `baseURL`-config key from inside the `nuxt.config.ts`
24
24
-**Prio 3**: Infer the origin _(Only in development)_
25
25
:::
26
26
27
27
:::tip
28
-
We recommend setting the `AUTH_ORIGIN` during runtime and leaving the `baseURL`-config key empty, to avoid using a potentially incorrect ORIGIN.
28
+
We recommend setting the `NUXT_AUTH_ORIGIN` during runtime and leaving the `baseURL`-config key empty, to avoid using a potentially incorrect ORIGIN.
29
29
:::
30
30
31
31
In addition to verifying that the origin is correctly set, also ensure that you have a secure [`secret` set in the NuxtAuthHandler](/guide/authjs/nuxt-auth-handler#secret).
@@ -36,7 +36,7 @@ When deploying a Local or Refresh -provider based app, you will only need to set
36
36
37
37
This path can either be:
38
38
39
-
-**Reletive**: Pointing at a path inside your own application (e.g. `/api/auth`)
39
+
-**Relative**: Pointing at a path inside your own application (e.g. `/api/auth`)
40
40
-**Absolute**: Pointing at a path inside an external application (e.g. `https://my-auth-backend/api`)
The name of the environment variable that holds the origin of the application. This is used to determine the origin of your application in production. Read more [here](/resources/error-reference#auth-no-origin).
35
+
28
36
## `disableServerSideAuth`
29
37
30
38
-**Type**: `boolean`
@@ -144,7 +152,7 @@ export default new CustomRefreshHandler()
144
152
145
153
If no custom RefreshHandler is defined, the [built-in-handler](https://github.com/sidebase/nuxt-auth/blob/main/src/runtime/utils/refreshHandler.ts) will be used to handle refreshes.
0 commit comments