
OAuth Setup: The Unfiltered Guide for Builders for the Top OAuth Providers
Introduction
Auth setup is a necessary evil. Most official documentation is a maze designed to waste a builder's time. This isn't that.
This is a direct, unfiltered guide. No fluff, no broken premises. Just the critical steps to get your OAuth 2.0 credentials for the major platforms and move on. Don't just patch on a login system; build a solid foundation for user access. Let's get it done.
1. Google OAuth (6 Steps)
The baseline. Get this done first.
Dashboard: https://console.developers.google.com/
- New Project: Go to Google Cloud Console. Name it
ImgSquash [Environment]. Create it. - Enable API: Navigate to
APIs & Services→Library. Search forGoogle+ APIand enable it. - Create OAuth Client: Go to
APIs & Services→Credentials. Click+ CREATE CREDENTIALS→OAuth 2.0 Client IDs. ChooseWeb application. - Set Redirect URIs:
- Production:
https://imgsquash.com/auth/callback - Staging:
https://staging.imgsquash.com/auth/callback - Dev:
http://localhost:3000/auth/callback
- Production:
- Configure Consent Screen: Set your App Name, Support Email, and the
userinfo.email+userinfo.profilescopes. - Get Credentials:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
2. GitHub OAuth (4 Steps)
For the builders. This one's easy.
Dashboard: https://github.com/settings/developers
- New OAuth App: Go to GitHub Developer Settings → OAuth Apps. Click
New OAuth App. - App Details: Fill in your Application name, Homepage URL, and a description.
- Callback URL: Set the Authorization callback URL for production, staging, and dev.
- Get Credentials:
GITHUB_CLIENT_IDGITHUB_CLIENT_SECRET
3. Apple Sign-In (8 Steps)
Apple's process is a broken model. You just have to push through it.
Dashboard: https://developer.apple.com/account
- Create App ID: In the Developer Console, create a new
App ID. Description:ImgSquash Web App. Bundle ID:com.imgsquash.web. - Enable Sign In with Apple: Find the capability and check the box.
- Create Service ID: Identifier:
com.imgsquash.web.service. - Configure Service: Edit the Service ID, enable "Sign in with Apple" again, and add your domain (
imgsquash.com). - Set Return URLs: Configure for production, staging, and dev.
- Create Key: Go to
Keys, create one, and enable "Sign in with Apple." - Generate Private Key: Download the
.p8file. Don't lose it. Note your Key ID and Team ID. - Generate Client Secret: This is a JWT you have to generate yourself.
APPLE_CLIENT_IDAPPLE_CLIENT_SECRET
4. Discord OAuth (4 Steps)
Simple. Direct. How it should be.
Dashboard: https://discord.com/developers/applications
- New Application: Create it and give it a name.
- Configure OAuth2: Go to the
OAuth2tab and add your Redirects. - Set Scopes: Add
bot,identify,email,guilds. - Get Credentials:
DISCORD_CLIENT_IDDISCORD_CLIENT_SECRET
5. Twitter OAuth 2.0 (6 Steps)
They call their developer platform a "platform." Incredible. You have to apply for access and wait.
Dashboard: https://developer.twitter.com/
- Apply for Access: You need "Elevated" access. Expect to wait.
- Create App: Once approved, create an app in the Developer Portal.
- App Details: Set your Website URL and a description.
- Set Permissions: Edit App permissions to
Readto get email address access. - Callback URL: Set the type to
Web Appand add your callback URL. - Get API Keys:
TWITTER_CLIENT_IDTWITTER_CLIENT_SECRET
6. Facebook & Instagram OAuth (Meta Platform)
Welcome to the Meta maze. One dashboard for both.
Dashboard: https://developers.facebook.com/
- Create App:
My Apps→Create App. Type:Business. - Add Products: Set up
Facebook LoginandInstagram Basic Display. - Configure Redirect URIs: Add your callback URLs for all environments. This is required for both products.
- App Review: You must request
emailandpublic_profilefor Facebook anduser_profilefor Instagram. Submit for review. - Get Credentials:
FACEBOOK_CLIENT_ID/FACEBOOK_CLIENT_SECRETINSTAGRAM_CLIENT_ID/INSTAGRAM_CLIENT_SECRET
Other Key Platforms
These are straightforward. No excuses.
- TikTok: (4 Steps) Go to the developer dashboard, create a Web App, set Redirect/Live URLs, and grab your credentials.
- Coinbase: (4 Steps) Go to OAuth Applications, create a new app, set details and permissions (
wallet:accounts:read,wallet:user:read), and get your keys.
Conclusion
The foundation is laid. Now execute.
- Plug these values into your environment files. No placeholders.
- Test every single provider. One by one.
- Build real error handling for failures.
- Get the buttons on the frontend.
Lets. Keep. Building. Faster.