Setting Up Authentication

Enable authentication for your project to manage user accounts, sessions, and security.

6.1 Authentication Overview

Navigate to the Authentication section to enable and configure auth for your project.

Authentication Overview

Figure 6.1: Authentication Overview

6.2 Enable Authentication

Click "Enable Authentication" to start the setup process.

Enable Authentication

Figure 6.2: Enable Authentication

6.3 Configure JWT Secret

Set up your JWT secret key for token signing. This should be a secure random string (minimum 32 characters).

JWT Secret Configuration

Figure 6.3: JWT Secret Configuration

6.4 Configure OAuth Providers

Set up OAuth providers (Google, GitHub, etc.) by providing:

  • Client ID
  • Client Secret
  • Redirect URI
  • Scopes
OAuth Configuration

Figure 6.4: OAuth Provider Configuration

6.5 Attack Protection & CAPTCHA

Optionally require a CAPTCHA (Cloudflare Turnstile) on sign-up, login, forgot password, OTP, magic link and resend-verification requests. It is off by default.

  1. In Cloudflare, create a Turnstile widget for your app's hostname and copy its site key and secret key. WoWSQL does not provide a shared widget.
  2. Open Authentication → Attack Protection, turn on CAPTCHA, paste both keys and save. The secret is stored encrypted and is not shown again.
  3. In your app, read the site key from GET /auth/v1/settings (captcha.site_key), render the widget and send its token as captcha_token (SDK option captchaToken / captcha_token, SDK 3.9.2 or later).

If CAPTCHA is on and the token is missing or invalid, auth requests fail with 400 "Security check failed. Please try again." If no secret key is saved, they fail with 503. See Overview → Authentication for the full reference.

6.6 Authentication Enabled

Once enabled, authentication tables are created and you can start managing users.

Authentication Enabled

Figure 6.6: Authentication Successfully Enabled