mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
22 lines
529 B
JavaScript
22 lines
529 B
JavaScript
export default (options) => {
|
|
return {
|
|
id: 'github',
|
|
name: 'GitHub',
|
|
type: 'oauth',
|
|
version: '2.0',
|
|
scope: 'user',
|
|
accessTokenUrl: 'https://github.com/login/oauth/access_token',
|
|
authorizationUrl: 'https://github.com/login/oauth/authorize',
|
|
profileUrl: 'https://api.github.com/user',
|
|
profile: (profile) => {
|
|
return {
|
|
id: profile.id,
|
|
name: profile.name || profile.login,
|
|
email: profile.email,
|
|
image: profile.avatar_url
|
|
}
|
|
},
|
|
...options
|
|
}
|
|
}
|