Sign Up
Authentication
Sign Up
Register a new user account with email and password
POST
Sign Up
Overview
This endpoint creates a new user account using Supabase Authentication with the PKCE flow. Upon successful registration, the user is automatically signed in and receives session tokens.Authentication
This endpoint does not require authentication (it creates the authentication).
Rate Limiting
This endpoint is protected by rate limiting middleware:- Default limit: 100 requests per 60 seconds
- Returns
429 Too Many Requestswhen limit is exceeded - Prevents abuse and spam account creation
Request Body
User’s email address. Must be a valid email format.Example:
user@example.comUser’s password. Should meet security requirements (minimum length, complexity, etc.).Example:
SecurePass123!Username or display name for the user. This will be stored in user metadata.Example:
AnimeWatcher123Response
Registration result containing user and session information
Session tokens and metadata
JWT access token for authenticated requests
Token used to refresh the access token when it expires
Time in seconds until the access token expires
Unix timestamp when the access token expires
Type of token (typically “bearer”)
Cookies Set
Upon successful registration, the following HTTP-only cookies are automatically set:
Attributes: HttpOnly, Secure, SameSite=Lax, Max-Age=7 daysContains the Supabase access token for authenticated requests
Attributes: HttpOnly, Secure, SameSite=Lax, Max-Age=7 daysContains the Supabase refresh token to maintain the session
Example Request
Example Response
Error Responses
Missing Required Fields
Status Code:400 Bad Request
Invalid Email Format
Status Code:400 Bad Request
Email Already Registered
Status Code:409 Conflict
Weak Password
Status Code:400 Bad Request
Rate Limit Exceeded
Status Code:429 Too Many Requests
Number of seconds to wait before making another request
Server Error
Status Code:500 Internal Server Error
Security Features
User Metadata
The following metadata is stored with the user account:user_name: Display name provided during registrationavatar_url: Profile picture URL (null by default, can be updated later)
Post-Registration Flow
After successful registration:- User Record Created: A new user record is created in Supabase Auth
- Public Profile: A corresponding record is created in the
public_userstable - Session Established: Access and refresh tokens are generated
- Cookies Set: Session tokens are stored in HTTP-only cookies
- Auto Sign-In: User is automatically signed in and can make authenticated requests
Next Steps
After signing up, users can:- Update their profile with Update Profile
- Upload an avatar image
- Start building their anime collection
- Save their preferences and watch history
Related Endpoints
- Sign In - Sign in to an existing account
- Update Profile - Update user profile information
- Get Profile - Retrieve user profile data
