GitLab Provider
Resources
Setup
Callback URL
https://example.com/api/auth/callback/gitlab
Environment Variables
AUTH_GITLAB_ID
AUTH_GITLAB_SECRET
Configuration
/auth.ts
import NextAuth from "next-auth"
import Gitlab from "next-auth/providers/gitlab"
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [Gitlab],
})
Notes
- Enable the
read_user
option in scope if you want to save the users email address on sign up.