Skip to content

Commit 0fb606c

Browse files
committed
docs: clean up env vars
1 parent f435025 commit 0fb606c

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

docs/pages/getting-started/deployment.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,12 @@ import { Accordion, Accordions } from "@/components/Accordion"
1111
distinguished from other environment variables more easily.
1212
</Callout>
1313

14-
Auth.js libraries require you to set an `AUTH_SECRET` environment variable. This is used to encrypt cookies and tokens. It should be a random string of at least 32 characters. On UNIX based systems you can use this command:
14+
Auth.js libraries require you to set an `AUTH_SECRET` environment variable. This is used to encrypt cookies and tokens. It should be a cryptographically secure random string of at least 32 characters:
1515

1616
```bash npm2yarn
1717
npm exec auth secret
1818
```
1919

20-
Alternatively, you can use the following `openssl` command, which should be available on all Linux / Mac OS X systems.
21-
22-
```bash
23-
openssl rand -base64 33
24-
```
25-
2620
If you are using an [OAuth Provider](/concepts/oauth), your provider will provide you with a **Client ID** and **Client Secret** that you will need to set as environment variables as well (in the case of an OIDC provider, like Auth0, a third `issuer` value might be also required, refer to the provider's specific documentation).
2721

2822
<Callout type="info">

docs/pages/guides/environment-variables.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,12 @@ AUTH_SECRET="This is an example"
3636
</Code.Express>
3737
</Code>
3838

39-
`AUTH_SECRET` is a random token used by the library to encrypt tokens and email verification hashes, and it's mandatory to keep things secure (See [Deployment](/getting-started/deployment) to learn more). You can use the CLI to generate an auth secret.
39+
`AUTH_SECRET` is a random token used by the library to encrypt tokens and email verification hashes, and it's mandatory to keep things secure (See [Deployment](/getting-started/deployment) to learn more). You can use the CLI to generate an auth secret:
4040

4141
```bash npm2yarn
4242
npm exec auth secret
4343
```
4444

45-
Alternatively, on Linux and Mac OS X based systems you can use the `openssl` CLI.
46-
47-
```bash
48-
openssl rand -base64 33
49-
```
50-
5145
## Environment Variable Inference
5246

5347
Auth.js is automatically configured to pick the right environment variables for `clientId` and `clientSecret` when using an [official OAuth provider](/getting-started/authentication/oauth).

0 commit comments

Comments
 (0)