From a46aa644b096e71e75b59507224ed92f7d2f99ba Mon Sep 17 00:00:00 2001
From: Alec Minchington <13358430+minchingtonak@users.noreply.github.com>
Date: Thu, 24 Oct 2024 23:19:42 -0700
Subject: [PATCH] feat: add Spotify oauth provider (#4581)
---
backend/oauth_connect.json | 19 +++++++++++++++++++
.../lib/components/InstanceSettings.svelte | 3 ++-
.../lib/components/icons/SpotifyIcon.svelte | 9 +++++++++
frontend/src/lib/components/icons/index.ts | 4 +++-
4 files changed, 33 insertions(+), 2 deletions(-)
create mode 100644 frontend/src/lib/components/icons/SpotifyIcon.svelte
diff --git a/backend/oauth_connect.json b/backend/oauth_connect.json
index 034aece2f4..994d9999fd 100644
--- a/backend/oauth_connect.json
+++ b/backend/oauth_connect.json
@@ -152,5 +152,24 @@
"vismanet_erp_interactive_api:read",
"vismanet_erp_interactive_api:update"
]
+ },
+ "spotify": {
+ "auth_url": "https://accounts.spotify.com/authorize",
+ "token_url": "https://accounts.spotify.com/api/token",
+ "scopes": [
+ "user-read-playback-state",
+ "user-modify-playback-state",
+ "user-read-currently-playing",
+ "playlist-read-private",
+ "playlist-read-collaborative",
+ "playlist-modify-private",
+ "playlist-modify-public",
+ "user-follow-read",
+ "user-read-playback-position",
+ "user-read-recently-played",
+ "user-top-read",
+ "user-library-modify",
+ "user-library-read"
+ ]
}
}
\ No newline at end of file
diff --git a/frontend/src/lib/components/InstanceSettings.svelte b/frontend/src/lib/components/InstanceSettings.svelte
index 5ff2262058..024ff0d1a9 100644
--- a/frontend/src/lib/components/InstanceSettings.svelte
+++ b/frontend/src/lib/components/InstanceSettings.svelte
@@ -206,7 +206,8 @@
'basecamp',
'linkedin',
'quickbooks',
- 'visma'
+ 'visma',
+ 'spotify'
]
let oauth_name = undefined
diff --git a/frontend/src/lib/components/icons/SpotifyIcon.svelte b/frontend/src/lib/components/icons/SpotifyIcon.svelte
new file mode 100644
index 0000000000..ce0da3d0d0
--- /dev/null
+++ b/frontend/src/lib/components/icons/SpotifyIcon.svelte
@@ -0,0 +1,9 @@
+
+
+
diff --git a/frontend/src/lib/components/icons/index.ts b/frontend/src/lib/components/icons/index.ts
index 8fb92470d8..da7e21ea91 100644
--- a/frontend/src/lib/components/icons/index.ts
+++ b/frontend/src/lib/components/icons/index.ts
@@ -91,6 +91,7 @@ import VismaIcon from './VismaIcon.svelte'
import JumpCloudIcon from './JumpCloudIcon.svelte'
import KeycloakIcon from './KeycloakIcon.svelte'
import ZitadelIcon from './ZitadelIcon.svelte'
+import SpotifyIcon from './SpotifyIcon.svelte'
export const APP_TO_ICON_COMPONENT = {
postgresql: PostgresIcon,
@@ -188,7 +189,8 @@ export const APP_TO_ICON_COMPONENT = {
visma: VismaIcon,
jumpcloud: JumpCloudIcon,
keycloak: KeycloakIcon,
- zitadel: ZitadelIcon
+ zitadel: ZitadelIcon,
+ spotify: SpotifyIcon
} as const
export {