Svelte Kit Environment vars pages
I am using @auth/svelte it use environment vars for AUTH_TRUST_HOST which needs to be true and some google secrets. These are picked up in dev locally but not getting in production. I have tried declaring them in wrangler.toml:
[vars]
AUTH_TRUST_HOST = true
and also in the dashboard: [see image]
But either way platform.env.AUTH_TRUST_HOST is null and I get errors complaining it needs to be true.
How can I set enviornment variables so they get picked up by sveltekit on cloudflare?
2 Replies
I am now successfully seeing the vars in event.platform.env but still getting the error:
Host must be trusted. URL was: https://beta.gotell.io/auth/session. Read more at https://errors.authjs.dev#untrustedhost
Auth.js | Errors
Authentication for the Web
did you solve this?