Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot Protection: nhost.auth.signUp don't allow passing headers like: x-cf-turnstile-response headers #603

Open
xmlking opened this issue Jan 8, 2025 · 0 comments

Comments

@xmlking
Copy link
Contributor

xmlking commented Jan 8, 2025

the example here: https://docs.nhost.io/guides/auth/bot-protection only outline SDK for nextjs
The standard JS SDK nhost.auth.signUp won't allow passing headers . e.g.:

    const { session, error } = await nhost.auth.signUp({
      email,
      password,
      options: {
        displayName: `${firstName} ${lastName}`,
        locale,
      },
      {
         headers: { // <-- this is not allowed 
           'x-cf-turnstile-response': turnstileResponse,
      },
   },
    });

would be nice if we can set headers at top level similar to nhost.graphql.setHeaders({}) to Future-proof SDK. e.g.:

nhost.auth.setHeaders({
   'x-cf-turnstile-response': turnstileResponse,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant