From the course: Master React 19 and Next.js 16 with Hands-On Projects and Real-World Applications

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Authentication: GitHub login

Authentication: GitHub login

Hello! In this session, I'll guide you through adding GitHub authentication to your Next.js application. We'll be integrating a Login with GitHub option into our existing NextAuth setup that already handles e-mail, password, and Google logins. This will give your users another convenient way to sign in. and you'll learn how to extend NextAuth with additional OAuth providers, a very common task in web development. Alright everyone, let's start by opening GitHub Developer Settings. Make sure you're logged into your GitHub account first. This is where we'll register our Next.js app to enable GitHub login. On the left sidebar, click OAuth Apps. and then click the New OAuth App button on the right. Now fill in the details for your application. Application name. You can call it something like Agora Auth App or your own project name. Homepage URL. For local development, enter http://localhost://3000. Enter this value. This is the route where NextAuth will handle the login callback from…

Contents