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 登入新增至您的頁面。
設定
回呼網址
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
>