From 371a10b126230842f9cadfa6c8c729097802b2ad Mon Sep 17 00:00:00 2001 From: adb-sh Date: Sat, 1 Oct 2022 23:56:13 +0200 Subject: [PATCH] debug --- backend/api/auth.mjs | 5 ++++- backend/store.mjs | 6 +++--- frontend | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/backend/api/auth.mjs b/backend/api/auth.mjs index 79504af..de5a90c 100644 --- a/backend/api/auth.mjs +++ b/backend/api/auth.mjs @@ -43,8 +43,11 @@ export const applyAuthRoutes = (router) => { const user = store.users.find(({ client }) => client.user.id === newClient.user.id); if (user) { user.client = newClient; + user.player = player; + user.accessToken = accessToken; + } else { + store.users.push({ client: newClient, player, accessToken, listeners: [], role: 'none' }); } - store.users.push({ client: newClient, player, accessToken, listeners: [], role: 'none' }); res.status(200); res.send({ message: 'authorized', accessToken }); } catch (e) { diff --git a/backend/store.mjs b/backend/store.mjs index 6d9a249..ffcb99d 100644 --- a/backend/store.mjs +++ b/backend/store.mjs @@ -1,6 +1,6 @@ export const store = { users: [], - clientID: '02d74b98c7904d6498b0b79def49cc5c', - clientSecret: 'e43b819037eb48e6b190865fc2c47b21', - redirectURL: 'http://127.0.0.1:8083/auth/callback', + clientID: process.env.APP_SPOTIFY_CLIENT_ID, + clientSecret: process.env.APP_SPOTIFY_CLIENT_SECRET, + redirectURL: process.env.APP_SPOTIFY_REDIRECT_URI, }; diff --git a/frontend b/frontend index 2d2383b..4b26d3a 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 2d2383b8ae320ceaf123f35916716191b96368a2 +Subproject commit 4b26d3aeef51185f4e27ae9e8700b378cd6cec0d