Auto-commit 2026-04-29 16:31
This commit is contained in:
42
node_modules/next-auth/src/providers/naver.ts
generated
vendored
Normal file
42
node_modules/next-auth/src/providers/naver.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import type { OAuthConfig, OAuthUserConfig } from "."
|
||||
|
||||
/** https://developers.naver.com/docs/login/profile/profile.md */
|
||||
export interface NaverProfile extends Record<string, any> {
|
||||
resultcode: string
|
||||
message: string
|
||||
response: {
|
||||
id: string
|
||||
nickname?: string
|
||||
name?: string
|
||||
email?: string
|
||||
gender?: "F" | "M" | "U"
|
||||
age?: string
|
||||
birthday?: string
|
||||
profile_image?: string
|
||||
birthyear?: string
|
||||
mobile?: string
|
||||
}
|
||||
}
|
||||
|
||||
export default function Naver<P extends NaverProfile>(
|
||||
options: OAuthUserConfig<P>
|
||||
): OAuthConfig<P> {
|
||||
return {
|
||||
id: "naver",
|
||||
name: "Naver",
|
||||
type: "oauth",
|
||||
authorization: "https://nid.naver.com/oauth2.0/authorize",
|
||||
token: "https://nid.naver.com/oauth2.0/token",
|
||||
userinfo: "https://openapi.naver.com/v1/nid/me",
|
||||
profile(profile) {
|
||||
return {
|
||||
id: profile.response.id,
|
||||
name: profile.response.nickname,
|
||||
email: profile.response.email,
|
||||
image: profile.response.profile_image,
|
||||
}
|
||||
},
|
||||
checks: ["state"],
|
||||
options,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user