Skip to main content
Hostwares

How to Add GitHub Login with Supabase Auth

sowad sheikh··1 min read

GitHub login is useful for developer-focused applications, dashboards, SaaS products, and tools where many users already have GitHub accounts. Supabase makes the authentication flow easier to integrate.

Create GitHub OAuth Credentials

Create an OAuth application through GitHub's developer settings. Configure the callback URL required by your Supabase authentication setup.

Enable GitHub in Supabase

Open your Supabase authentication providers. Enable GitHub and add the OAuth credentials.

Add the Login Action

Your application can trigger GitHub authentication when the user clicks the login button. The user is redirected to GitHub.

Return to Your Application

After authorization, GitHub redirects the user back through the configured Supabase authentication flow. Your application can then access the user's authenticated session.

Store User Information Carefully

Supabase Auth handles the authentication identity. If your application needs additional profile information, you can maintain a separate profile table linked to the authenticated user.

Test Before Launch

Always test the OAuth flow on both development and production URLs. A small redirect URL mismatch can prevent login from working correctly.

Ready to deploy?

Launch your app on Hostwares — start for $1.00/mo with auto-scaling & global CDN.

Start for $1.00/mo

Ready to deploy? Start for $1.00/mo

Deploy now