providers/naver
NaverProfile
https://developers.naver.com/docs/login/profile/profile.md
扩展
Record
<string
,any
>
属性
message
message: string;
response
response: {
age: string;
birthday: string;
birthyear: string;
email: string;
gender: "F" | "M" | "U";
id: string;
mobile: string;
name: string;
nickname: string;
profile_image: string;
};
age?
optional age: string;
birthday?
optional birthday: string;
birthyear?
optional birthyear: string;
email?
optional email: string;
gender?
optional gender: "F" | "M" | "U";
id
id: string;
mobile?
optional mobile: string;
name?
optional name: string;
nickname?
optional nickname: string;
profile_image?
optional profile_image: string;
resultcode
resultcode: string;
default()
default<P>(options): OAuthConfig<P>
将 Naver 登录添加到您的页面。
设置
回调 URL
https://example.com/api/auth/callback/naver
配置
import { Auth } from "@auth/core"
import Naver from "@auth/core/providers/naver"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Naver({ clientId: NAVER_CLIENT_ID, clientSecret: NAVER_CLIENT_SECRET }),
],
})
资源
注释
默认情况下,Auth.js 假设 Naver 提供商基于 OAuth 2 规范。
💡
Naver 提供商附带一个 默认配置。要覆盖您的用例的默认值,请查看 自定义内置 OAuth 提供商。
类型参数
类型参数 |
---|
P extends NaverProfile |
参数
参数 | 类型 |
---|---|
options | OAuthUserConfig <P > |
返回值
OAuthConfig
<P
>