fix: documented way of using siteKey doesn't work #318
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
needs reproduction
🐛 The bug
According to https://github.com/nuxt-modules/turnstile/blob/main/README.md this is all you need in your Nuxt config to declare the siteKey
However, that provides an error
NuxtTurnstile.vue:53 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'siteKey')
I couldn't use your Stackblitz since that gives:
🛠️ To reproduce
Doesn't work. All I have on my Nuxt app for modules though is Tailwind and Turnstile. I just followed the docs as they say.
🌈 Expected behaviour
I expected not to get the error.
ℹ️ Additional context
In order to fix my issue, I put the suggested code into public runtimeConfig and it worked. My final implementation was:
The text was updated successfully, but these errors were encountered: