marsidev/react-turnstile

sitekey was not provided

gbagush opened this issue · 3 comments

<Turnstile
    siteKey={process.env.SITE_KEY}
/>

i already import dotenv but its show sitekey was not provided

What was the solution to this? I'm currently stuck with either the same or a similar problem.

What was the solution to this? I'm currently stuck with either the same or a similar problem.

I use nextjs, so the env variable must begin with NEXT_PUBLIC_ so that it can be accessed on the client side

https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables

Ah, thanky for the reply, unfortunately that wasn't it for me (think I'm running into some strange behaviour with edge, turnstile and wrangler all fighting.)