#How to define a `secret` when integrating qwik with Auth.js?

4 messages · Page 1 of 1 (latest)

white lantern
#

I am following the qwik docs to use Qwik+Auth.js, below is the docs about integrating Auth.js:
https://qwik.builder.io/docs/integrations/authjs/

I ran the installation command below:

npm run qwik add auth

but there are some errors in Command Line Window:

Error  shown in screenshot below.

it says that needing to define a secret.How to define the secret? I use windows 11.

Qwik

No hydration, auto lazy-loading, edge-optimized, and fun 🎉!

dreamy cosmos
#

You need to define an auth secret in your .env file

AUTH_SECRET="your_secret_here"
undone wren
#

You probably want to set the secret in .env.local for local development. For production you should set it however your hosting provider lets you set environment variables directly; without using .env files for secrets.