Overview
AniDev provides multiple authentication methods to access the platform. You can create an account using your email and password or sign in quickly with Google OAuth.Sign Up
Creating a new AniDev account is a multi-step process that helps personalize your anime experience from the start.Create Your Account
Navigate to the sign-up page at
/signup and provide the following information:- Username: Minimum 3 characters
- Email: Valid email address
- Password: Must meet security requirements
Complete Your Profile
After account creation, you’ll be prompted to complete your profile:
- Upload a profile picture (avatar)
- Enter your first name and last name
- Select your birthday
- Choose your gender (Male, Female, or Other)
Set Your Preferences
Tell AniDev about your anime preferences:
- Favorite Animes: Select from popular titles like One Piece, Naruto, Attack on Titan, and more
- Watch Frequency: How often you watch anime (Daily, Weekly, Monthly, Occasionally, Rarely)
- Fanatic Level: From Casual Viewer to Hardcore Otaku
- Preferred Format: TV Series, Movies, OVA, ONA, Specials, or No preference
- Watched Animes: Track what you’ve already seen
- Favorite Studios: Select from Studio Ghibli, Mappa, ufotable, and more
- Favorite Genres: Action, Adventure, Romance, Sci-Fi, and many others
Password Requirements Reference
The sign-up system validates passwords using Zod schema validation defined insrc/domains/auth/schemas/signup.ts:
Sign In
Returning users can sign in using their email and password or Google account.Enter Credentials
Provide your registered email and password. The same password validation rules apply.
Google OAuth
For faster access, you can authenticate using your Google account.When signing in with Google, AniDev automatically:
- Creates a Supabase user account if one doesn’t exist
- Stores your Google profile name and avatar
- Generates a secure session token
- Adds your profile to the
public_userstable
How Google Auth Works
The authentication flow is configured inauth.config.js:
- Click the “Sign in with Google” button on either sign-up or sign-in pages
- Google prompts you to select an account and grant permissions (openid, email, profile)
- AniDev receives your Google profile information
- The system checks if a user with your email already exists
- If new, creates both a Supabase auth user and a public profile entry
- Generates a magic link token for session management
- You’re automatically signed in and redirected
Authentication Security
Rate Limiting
Both/api/auth/signup and /api/auth/signin endpoints implement rate limiting to prevent abuse:
Session Management
Once authenticated, your session is managed through:- Session Tokens: Stored in secure cookies
- Supabase Access Token: Generated via magic link for API requests
- User Profile Sync: Session includes your latest profile data from
public_userstable
/api/auth/session.
Troubleshooting
I forgot my password
I forgot my password
Currently, AniDev uses Supabase Auth for password management. Contact support or use the password reset feature in Supabase if implemented.
Google sign-in isn't working
Google sign-in isn't working
Ensure you:
- Have pop-ups enabled in your browser
- Are using a valid Google account
- Have granted the required permissions (openid, email, profile)
- Check your network connection
My session keeps expiring
My session keeps expiring
Sessions are managed by Supabase Auth. If you’re experiencing frequent logouts:
- Clear your browser cookies and cache
- Ensure cookies are enabled
- Try signing in again
Password validation errors
Password validation errors
Double-check that your password meets all requirements:
- 6-20 characters
- At least one lowercase letter (a-z)
- At least one uppercase letter (A-Z)
- At least one number (0-9)
- At least one special character (!@#$%^&*)
API Reference
Authentication endpoints:POST /api/auth/signup- Register a new userPOST /api/auth/signin- Authenticate existing userGET /api/auth/session- Get current session informationGET /api/auth/callback- OAuth callback handler (used by Google auth)
