Authentication
Email/password auth is handled by @bolkauth/core and exposed through the route handler mounted at /api/auth.
Configuration
Sign Up
POST /api/auth/sign-up
On success, BolkAuth creates the user, creates a session, and sets the session cookie.
Sign In
POST /api/auth/sign-in/email
Invalid credentials return an invalid_credentials error without revealing whether the email exists.
React Hooks
Password Storage
BolkAuth hashes passwords using Web Crypto PBKDF2 before storing them through the adapter. The database stores only the hashed password value, never the plain text password.
Common Errors
| Code | Cause |
|---|---|
invalid_email | Email is missing or not in a valid format. |
weak_password | Password is shorter than minPasswordLength. |
user_exists | A sign-up request used an email that already exists. |
invalid_credentials | Sign-in email/password did not match an account. |