1. 6
    Implement Third Party Authentication with GitHub in Next.js Using Supabase
    3m 5s

Implement Third Party Authentication with GitHub in Next.js Using Supabase

Share this video with your friends

Send Tweet

Supabase offers a number of authentication options out of the box. In this video, we look at implementing third party auth using GitHub as a provider.

In order to do this, we need to register a new OAuth application in GitHub, and configure it to communicate with our Supabase project. Supabase automatically handles receiving tokens at the /auth/v1/callback endpoint.

Additionally, we implement /login and /logout pages to handle authentication in our Next.js application. We can use the supabase-js library to detect whether or not a user is signed in using the supabase.auth.user() function.

~ 2 years ago

BTW, you may need to restart your Next.js dev server whenever you add new variables to .env.local.

Jon Meyers
Jon Meyers(instructor)
~ 2 years ago

Excellent call out! Thanks! 🙌