Authentication .

Evines uses **Auth.js (v5)**. You can start with just Email (Resend) or add Social Login (Google & GitHub).

Full Auth.js Documentation

Pro-tip: Start with Resend only

You don't need to configure everything at once. **The app will work perfectly with only Resend configured.** Social providers can be added later as you scale.

1. Generate Auth Secret

Run this to generate your session encryption key

npx auth secret

Magic Links (Resend)

1. Create an API Key at resend.com.

2. Set AUTH_RESEND_KEY in your .env.

3. Use onboarding@resend.dev as EMAIL_FROM for instant testing.

Note: When using the onboarding email, you can only send links to the email address associated with your Resend account.

Optional: Social Providers

Google Cloud

Create a project in the Google Console and set the redirect URI:

YOUR_URL/api/auth/callback/google
GitHub Developers

Register a new OAuth App in GitHub Settings and set the callback URL:

YOUR_URL/api/auth/callback/github

Copy these into your .env file

AUTH_SECRET="..."

AUTH_RESEND_KEY="re_..."

EMAIL_FROM="onboarding@resend.dev"

# Required for Social Login

AUTH_GOOGLE_ID=""

AUTH_GOOGLE_SECRET=""

AUTH_GITHUB_ID=""

AUTH_GITHUB_SECRET=""

Ready to explore?

Database and Auth are correctly linked.

npm run dev

localhost:3000

Log in via the landing page to test your dashboard access.