This app supports multiple authentication providers. You can use GitHub, Google, or Discord - all are free and easy to set up!
| Provider | Setup Time | Best For | Username Source |
|---|---|---|---|
| GitHub ⭐ | ~2 minutes | Developers | GitHub username |
| ~3 minutes | General users | Email prefix | |
| Discord | ~3 minutes | Gamers/Communities | Discord username |
GitHub is the easiest and fastest to set up:
-
Go to GitHub Settings
- Visit: https://github.com/settings/developers
- Click "New OAuth App"
-
Fill in the form:
- Application name:
NEET.me(or your app name) - Homepage URL:
http://localhost:1337(for local dev) - Authorization callback URL:
http://localhost:1337/api/auth/callback/github - Click "Register application"
- Application name:
-
Copy your credentials:
- Copy the Client ID
- Click "Generate a new client secret" and copy it
-
Add to
.envfile:GITHUB_CLIENT_ID=your_client_id_here GITHUB_CLIENT_SECRET=your_client_secret_here
-
For production, update the callback URL to:
https://yourdomain.com/api/auth/callback/github
-
Go to Google Cloud Console
- Visit: https://console.cloud.google.com/
- Create a new project or select existing one
-
Enable Google+ API
- Go to "APIs & Services" > "Library"
- Search for "Google+ API" and enable it
-
Create OAuth Credentials
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose "Web application"
- Add authorized redirect URI:
http://localhost:1337/api/auth/callback/google - Copy Client ID and Client Secret
-
Add to
.envfile:GOOGLE_CLIENT_ID=your_client_id_here GOOGLE_CLIENT_SECRET=your_client_secret_here
-
For production, update the redirect URI to:
https://yourdomain.com/api/auth/callback/google
-
Go to Discord Developer Portal
- Visit: https://discord.com/developers/applications
- Click "New Application"
- Name it and create
-
Set up OAuth2
- Go to "OAuth2" in the left sidebar
- Under "Redirects", add:
http://localhost:1337/api/auth/callback/discord - Copy Client ID and Client Secret (click "Reset Secret" if needed)
-
Add to
.envfile:DISCORD_CLIENT_ID=your_client_id_here DISCORD_CLIENT_SECRET=your_client_secret_here
-
For production, update the redirect URI to:
https://yourdomain.com/api/auth/callback/discord
You can enable all three providers at once! Just add all the credentials to your .env file:
# GitHub
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# Google
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Discord
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secretUsers will see all available options on the sign-in page.
Make sure your .env file includes:
DATABASE_URL="file:./dev.db"
NEXTAUTH_URL="http://localhost:1337"
NEXTAUTH_SECRET="your-secret-key-here"
# Add at least one provider:
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
# OR
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
# OR
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""- Start your dev server:
npm run dev - Visit
http://localhost:1337 - Click "Get Started"
- Choose your preferred provider
- Sign in and you'll be redirected to the dashboard!
- Double-check your Client ID and Secret
- Make sure there are no extra spaces in
.env - Restart your dev server after changing
.env
- Ensure the callback URL in your provider settings matches exactly:
- Local:
http://localhost:1337/api/auth/callback/[provider] - Production:
https://yourdomain.com/api/auth/callback/[provider]
- Local:
- Check the browser console for errors
- Verify the user was created in the database:
npm run db:studio
When deploying to production:
- Update all callback URLs in your provider settings
- Set
NEXTAUTH_URLto your production domain - Generate a secure
NEXTAUTH_SECRET:openssl rand -base64 32
- Update your database URL if using a production database
- GitHub: Free, instant approval, perfect for developers
- Google: Widely trusted, used by billions
- Discord: Popular with gaming/community audiences
All three are much easier than Twitter/X which requires API approval!