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
@@ -11,35 +20,41 @@ You will need a [WorkOS account](https://dashboard.workos.com/signup).
11
20
## Running the example
12
21
13
22
1. In the [WorkOS dashboard](https://dashboard.workos.com), click on the User Management tile and set up the [sign-in callback redirect](https://workos.com/docs/user-management/1-configure-your-project/configure-a-redirect-uri) as `http://localhost:3000/api/auth/callback`. Once completed, set the app homepage URL to `http://localhost:3000`.
14
-
15
23
> [!NOTE]
16
24
> If you already have set up an application in your WorkOS dashboard, then you can simply head to the _Redirects_ tab and add a new redirect URI.
17
-
18
25
2. After creating the redirect URI, navigate to the API keys tab and copy the _Client ID_ and the _Secret Key_. Rename the `.env.example` file to `.env` and supply your Client ID and API key as environment variables.
19
-
20
26
3. Additionally, create a cookie password as the private key used to encrypt the session cookie. Copy the output into the environment variable `WORKOS_COOKIE_PASSWORD`.
21
-
22
27
It has to be at least 32 characters long. You can use https://1password.com/password-generator/ to generate strong passwords.
23
-
24
28
4. Verify your `.env.local` file has the following variables filled.
`WORKOS_COOKIE_PASSWORD` is the private key used to encrypt the session cookie. It has to be at least 32 characters long. You can use the [1Password generator](https://1password.com/password-generator/) or the `openssl` library to generate a strong password via the command line:
34
-
35
36
```bash
36
37
openssl rand -base64 24
37
38
```
38
-
39
39
To use the `signOut` method, you'll need to set a default Logout URI in your WorkOS dashboard settings under "Redirects".
40
-
41
40
5. Run the following command and navigate to [http://localhost:3000](http://localhost:3000).
0 commit comments