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
, then it looks like we autoconfigure this for certain cloud hosting providers, such as vercel or cloudflare pages. But cloudflare workers isn't one of them. I propose we add cloudflare workers to this shortlist
Non-Goals
No response
Background
See the linked issues. The alternative is for the user to manually set trustHost in the JS side, or to set AUTH_TRUST_HOST as an env var
Proposal
Add the relevant test to the linked code. I did some google searching to try to find what env var we could look for to use as a signal that we are running in a CF workers runtime, but I had no success. If someone points me in the right direction I will submit a PR.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Goals
I deployed an app to cloudflare pages and ran into #8327. The short answer was for me to manually set trustHost to true. But if I look at
next-auth/packages/core/src/lib/utils/env.ts
Lines 44 to 50 in 3664aa5
Non-Goals
No response
Background
See the linked issues. The alternative is for the user to manually set trustHost in the JS side, or to set
AUTH_TRUST_HOST
as an env varProposal
Add the relevant test to the linked code. I did some google searching to try to find what env var we could look for to use as a signal that we are running in a CF workers runtime, but I had no success. If someone points me in the right direction I will submit a PR.
Beta Was this translation helpful? Give feedback.
All reactions