mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
23 lines
583 B
JavaScript
23 lines
583 B
JavaScript
export default function GitLab(options) {
|
|
return {
|
|
id: "gitlab",
|
|
name: "GitLab",
|
|
type: "oauth",
|
|
version: "2.0",
|
|
scope: "read_user",
|
|
params: { grant_type: "authorization_code" },
|
|
accessTokenUrl: "https://gitlab.com/oauth/token",
|
|
authorizationUrl: "https://gitlab.com/oauth/authorize?response_type=code",
|
|
profileUrl: "https://gitlab.com/api/v4/user",
|
|
profile(profile) {
|
|
return {
|
|
id: profile.id,
|
|
name: profile.username,
|
|
email: profile.email,
|
|
image: profile.avatar_url,
|
|
}
|
|
},
|
|
...options,
|
|
}
|
|
}
|