sst
Version:
23 lines (22 loc) • 675 B
JavaScript
import { Issuer } from "openid-client";
import { OauthAdapter } from "./oauth.js";
const issuer = new Issuer({
issuer: "https://accounts.spotify.com",
authorization_endpoint: "https://accounts.spotify.com/authorize",
token_endpoint: "https://accounts.spotify.com/api/token",
});
/**
* The Spotify Adapter follows the PKCE flow outlined here:
* https://developer.spotify.com/documentation/web-api/tutorials/code-pkce-flow
*
* List of scopes available:
* https://developer.spotify.com/documentation/web-api/concepts/scopes
*/
export const SpotifyAdapter =
/* @__PURE__ */
(config) => {
return OauthAdapter({
issuer,
...config,
});
};