providers/spotify
SpotifyImage
屬性
url
url: string;
SpotifyProfile
繼承自
Record
<string
,any
>
屬性
display_name
display_name: string;
email: string;
id
id: string;
images
images: SpotifyImage[];
default()
default<P>(options): OAuthConfig<P>
將 Spotify 登入新增至您的頁面。
設定
回調 URL
https://example.com/api/auth/callback/spotify
組態
import { Auth } from "@auth/core"
import Spotify from "@auth/core/providers/spotify"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Spotify({
clientId: SPOTIFY_CLIENT_ID,
clientSecret: SPOTIFY_CLIENT_SECRET,
}),
],
})
資源
注意事項
預設情況下,Auth.js 假設 Spotify 提供者是基於 OAuth 2 規範。
💡
Spotify 提供者具有預設組態。若要覆寫您的使用案例的預設值,請查看自訂內建 OAuth 提供者。
類型參數
類型參數 |
---|
P 繼承自 SpotifyProfile |
參數
參數 | 類型 |
---|---|
options | OAuthUserConfig <P > |
返回
OAuthConfig
<P
>