-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add spotify oauth adapter (#73)
* auto: format code * Remove predefined scopes from Spotify adapter to allow user-defined scopes * auto: format code --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2e9967c
commit 83125f1
Showing
4 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@openauthjs/openauth": patch | ||
--- | ||
|
||
Remove predefined scopes from Spotify adapter to allow user-defined scopes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from "./code.js" | ||
export type { Adapter } from "./adapter.js" | ||
export * from "./spotify.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Oauth2Adapter, type Oauth2WrappedConfig } from "./oauth2.js" | ||
|
||
export function SpotifyAdapter(config: Oauth2WrappedConfig) { | ||
return Oauth2Adapter({ | ||
...config, | ||
type: "spotify", | ||
endpoint: { | ||
authorization: "https://accounts.spotify.com/authorize", | ||
token: "https://accounts.spotify.com/api/token", | ||
}, | ||
}) | ||
} |