Skip to content

Instantly share code, notes, and snippets.

@heiwais25
Last active October 6, 2020 09:58
Show Gist options
  • Save heiwais25/ab155771bb968a1c1a50b296c638dff8 to your computer and use it in GitHub Desktop.
Save heiwais25/ab155771bb968a1c1a50b296c638dff8 to your computer and use it in GitHub Desktop.
Next-Auth with Naver
{
id: 'naver',
name: 'Naver',
type: 'oauth',
version: '2.0',
params: { grant_type: 'authorization_code' },
profileUrl: 'https://openapi.naver.com/v1/nid/me',
profile: (profile) => {
return {
id: profile.response.id,
name: profile.response.name,
email: profile.response.email,
image: profile.response.image,
}
},
clientId: process.env.NAVER_CLIENT_ID,
clientSecret: process.env.NAVER_CLIENT_SECRET,
accessTokenUrl: 'https://nid.naver.com/oauth2.0/token',
authorizationUrl: 'https://nid.naver.com/oauth2.0/authorize?response_type=code',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment