Menu
NextAuth LogoNextAuth LogoNextAuth.jsDocumentationTutorialsFAQ
npmGitHub
๐ŸŒœ
๐ŸŒž
NextAuth LogoNextAuth LogoNextAuth.js
  • Documentation
  • Tutorials
  • FAQ
  • npm
  • GitHub
  • Getting Started
    • Introduction
    • Example Code
    • Client API
    • REST API
    • TypeScript Support
  • Configuration
    • Options
    • Providers
    • Databases
    • Pages
    • Callbacks
    • Events
  • Models & Schemas
    • Models
    • MySQL
    • Postgres
    • Microsoft SQL Server
    • MongoDB
    • Database Adapters
  • Authentication Providers
    • Amazon Cognito
    • Apple
    • Atlassian
    • Auth0
    • Azure Active Directory B2C
    • Basecamp
    • Battle.net
    • Box
    • Bungie
    • Credentials
    • Discord
    • Email
    • EVE Online
    • Facebook
    • Foursquare
    • FusionAuth
    • GitHub
    • GitLab
    • Google
    • IdentityServer4
    • Instagram
    • Kakao
    • LINE
    • LinkedIn
    • Mail.ru
    • Medium
    • Netlify
    • Okta
    • Osso
    • Reddit
    • Salesforce
    • Slack
    • Spotify
    • Strava
    • Twitch
    • Twitter
    • VK
    • Yandex

GitHub

Documentation#

https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps

Configuration#

https://github.com/settings/apps

Example#

import Providers from `next-auth/providers`
...
providers: [
Providers.GitHub({
clientId: process.env.GITHUB_CLIENT_ID,
clientSecret: process.env.GITHUB_CLIENT_SECRET
})
]
...
warning

Only allows one callback URL per Client ID / Client Secret.

tip

Email address is not returned if privacy settings are enabled.

Edit this page
Previous
ยซ FusionAuth
Next
GitLab ยป
  • Documentation
  • Configuration
  • Example

About NextAuth.js

  • Introduction
  • Contributors
  • Canary documentation

Download

  • GitHub
  • NPM

Acknowledgements

  • Docusaurus
  • Images by unDraw
  • Powered by Vercel
NextAuth.js © Iain Collins 2021