Authentication WooCommerce Optional
Headless Auth
Complete authentication solution for headless WordPress stores. Supports phone-based OTP login, username/email + password login, JWT access & refresh tokens, user registration, and brute-force protection.
Features
Phone-based OTP login with configurable delivery (SMS, WhatsApp, etc.)
Username/email + password login
JWT access tokens (configurable TTL) + refresh tokens
New user registration with WooCommerce customer role
Rate limiting and brute-force protection with lockout
Test mode for development with admin-only OTP viewing
API Endpoints
| Method | Path |
|---|---|
| POST | /headless-auth/v1/otp/send |
| POST | /headless-auth/v1/otp/verify |
| POST | /headless-auth/v1/auth/login |
| POST | /headless-auth/v1/auth/register |
| POST | /headless-auth/v1/auth/refresh |
| GET | /headless-auth/v1/auth/me |
API Example
# Send OTP
curl -X POST https://store.example.com/wp-json/headless-auth/v1/otp/send \
-H "Content-Type: application/json" \
-d '{"phone": "+919876543210"}'
# Verify OTP and get tokens
curl -X POST https://store.example.com/wp-json/headless-auth/v1/otp/verify \
-H "Content-Type: application/json" \
-d '{"phone": "+919876543210", "otp": "482916"}' FAQ
How does the OTP delivery work?
You configure a JSON template with a webhook URL. When an OTP is requested, the plugin sends a POST request with the phone number and OTP code to your endpoint, which handles the actual SMS/WhatsApp delivery.
Does it work without WooCommerce?
Yes. Without WooCommerce, new users get the default WordPress subscriber role. With WooCommerce, they get the customer role and billing phone metadata is synced.
More Plugins
Headless Clarity
AnalyticsMicrosoft Clarity session recordings and heatmaps
1 endpoint
Headless Fuzzy Find
SearchWeighted, fuzzy product search with autocomplete
Requires WooCommerce 2 endpoints
Headless Google Analytics
AnalyticsGA4 with Measurement Protocol and WooCommerce tracking
WooCommerce Optional 1 endpoint
Headless Meta Pixel
AnalyticsMeta Pixel with Conversions API and PII hashing
WooCommerce Optional 2 endpoints