Skip to content

Commit c9e37e2

Browse files
chore: migrate to new auth strategy (#27)
1 parent 8b5f20a commit c9e37e2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

app/services/spotify.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { InMemoryCachingStrategy, SpotifyApi } from '@spotify/web-api-ts-sdk'
1+
import { SpotifyApi } from '@spotify/web-api-ts-sdk'
22
import type { Page, Track } from '@spotify/web-api-ts-sdk'
33
import {
44
filter,
@@ -98,7 +98,7 @@ async function* paginate<Item>(
9898
} while (offset < lastPage.total)
9999
}
100100

101-
const spotify = SpotifyApi.withImplicitGrant(
101+
const spotify = SpotifyApi.withUserAuthorization(
102102
`b61d28d1ed4c49e8ba5d2923ed367262`,
103103
SITE_URL,
104104
[
@@ -108,5 +108,4 @@ const spotify = SpotifyApi.withImplicitGrant(
108108
`user-library-read`,
109109
`user-read-playback-state`,
110110
],
111-
{ cachingStrategy: new InMemoryCachingStrategy() },
112111
)

0 commit comments

Comments
 (0)