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.
Figure 6.1: Authentication Overview
6.2 Enable Authentication
Click "Enable Authentication" to start the setup process.
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).
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
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.
- 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.
- Open Authentication → Attack Protection, turn on CAPTCHA, paste both keys and save. The secret is stored encrypted and is not shown again.
- In your app, read the site key from
GET /auth/v1/settings(captcha.site_key), render the widget and send its token ascaptcha_token(SDK optioncaptchaToken/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.
Figure 6.6: Authentication Successfully Enabled