download
raw
976 Bytes
/**
* Use this provider to authenticate with Spotify.
*
* ```ts {5-8}
* import { SpotifyProvider } from "@openauthjs/openauth/provider/spotify"
*
* export default issuer({
* providers: {
* spotify: SpotifyProvider({
* clientID: "1234567890",
* clientSecret: "0987654321"
* })
* }
* })
* ```
*
* @packageDocumentation
*/
import { Oauth2Provider, type Oauth2WrappedConfig } from "./oauth2.js"
export interface SpotifyConfig extends Oauth2WrappedConfig {}
/**
* Create a Spotify OAuth2 provider.
*
* @param config - The config for the provider.
* @example
* ```ts
* SpotifyProvider({
* clientID: "1234567890",
* clientSecret: "0987654321"
* })
* ```
*/
export function SpotifyProvider(config: SpotifyConfig) {
return Oauth2Provider({
...config,
type: "spotify",
endpoint: {
authorization: "https://accounts.spotify.com/authorize",
token: "https://accounts.spotify.com/api/token",
},
})
}

Xet Storage Details

Size:
976 Bytes
·
Xet hash:
8721e8d03c0e8c419eaef3f077b42a1d8233b06fdaa8a7be2a163f43c2ed1b39

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.