Menu
NextAuth LogoNextAuth.jsDocumentation
npmGitHub
NextAuth LogoNextAuth.js
  • Documentation
  • npm
  • GitHub
  • Getting Started
    • Introduction
    • Example
    • Client API
    • REST API
  • Configuration
    • Options
    • Providers
    • Databases
    • Pages
    • Callbacks
    • Events
  • Providers
    • Apple
    • Auth0
    • Battle.net
    • Box
    • Amazon Cognito
    • Discord
    • Email
    • Credentials
    • Facebook
    • GitHub
    • GitLab
    • Google
    • IdentityServer4
    • LinkedIn
    • Mixer
    • Okta
    • Slack
    • Spotify
    • Twitch
    • Twitter
    • Yandex
  • Models & Schemas
    • Models
    • MySQL
    • Postgres
    • MongoDB
    • Database Adapters
  • Tutorials
    • Testing

GitLab

#Documentation

https://docs.gitlab.com/ee/api/oauth2.html

#Configuration

https://gitlab.com/profile/applications

#Example

import Providers from `next-auth/providers`
...
providers: [
Providers.GitLab({
clientId: process.env.GITLAB_CLIENT_ID,
clientSecret: process.env.GITLAB_CLIENT_SECRET
})
}
...
tip

Enable the "read_user" option in scope if you want to save the users email address on sign up.

Edit this page
Previous
« GitHub
Next
Google »
  • Documentation
  • Configuration
  • Example

About NextAuth.js

  • Introduction
  • Contributors

Download

  • GitHub
  • NPM

Acknowledgements

  • Docusaurus v2 🦖
  • Images by unDraw
NextAuth.js © Iain Collins 2020