Skip to content

Commit

Permalink
feat: add spotify oauth adapter (#73)
Browse files Browse the repository at this point in the history
* 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
devin-ai-integration[bot] authored Dec 14, 2024
1 parent 2e9967c commit 83125f1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-turtles-marry.md
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
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions packages/openauth/src/adapter/index.ts
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"
12 changes: 12 additions & 0 deletions packages/openauth/src/adapter/spotify.ts
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",
},
})
}

0 comments on commit 83125f1

Please sign in to comment.