From 0f4f0f7c978ee9642c1fa4fa3c3589e4287538e0 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 10 May 2024 14:31:06 +0200 Subject: [PATCH 1/2] refactor(Intro): use Facebook type for ctx Authenticate action --- src/routes/Intro/Intro.js | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/routes/Intro/Intro.js b/src/routes/Intro/Intro.js index 908499a8b..cde07bc96 100644 --- a/src/routes/Intro/Intro.js +++ b/src/routes/Intro/Intro.js @@ -82,32 +82,13 @@ const Intro = ({ queryParams }) => { openLoaderModal(); getFacebookToken() .then((accessToken) => { - return fetch('https://www.strem.io/fb-login-with-token/' + encodeURIComponent(accessToken)) - .then((resp) => resp.json()) - .catch(() => { - throw new Error('Login failed at getting token from Stremio'); - }) - .then(({ user } = {}) => { - if (!user || typeof user.email !== 'string' || typeof user.fbLoginToken !== 'string') { - throw new Error('Login failed at getting token from Stremio'); - } - - return { - email: user.email, - password: user.fbLoginToken - }; - }); - }) - .then(({ email, password }) => { core.transport.dispatch({ action: 'Ctx', args: { action: 'Authenticate', args: { - type: 'Login', - email, - password, - facebook: true + type: 'Facebook', + token: accessToken, } } }); From 69a1a8b92e50c302f5699f61671fa2e311cd5127 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 25 Jun 2024 19:25:31 +0200 Subject: [PATCH 2/2] chore: update stremio-core-web --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 76db0e04a..351558728 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@babel/runtime": "7.16.0", "@sentry/browser": "6.13.3", "@stremio/stremio-colors": "5.0.1", - "@stremio/stremio-core-web": "0.47.2", + "@stremio/stremio-core-web": "0.47.7", "@stremio/stremio-icons": "5.2.0", "@stremio/stremio-video": "0.0.38", "a-color-picker": "1.2.1", @@ -2971,9 +2971,9 @@ "license": "MIT" }, "node_modules/@stremio/stremio-core-web": { - "version": "0.47.2", - "resolved": "https://registry.npmjs.org/@stremio/stremio-core-web/-/stremio-core-web-0.47.2.tgz", - "integrity": "sha512-kJXkshXT5f5go137id9MHrVA7PfHao2pGSxfEBbMDGFCqAVfF4jRFTXmfLC0cS1R+EjYhajUrSsXnEddtb2c7g==", + "version": "0.47.7", + "resolved": "https://registry.npmjs.org/@stremio/stremio-core-web/-/stremio-core-web-0.47.7.tgz", + "integrity": "sha512-3hTie3Yx6198TY1rS2fdA5HKPmejqTDbE8C05+HdqM6oXor9TXVoSjY9AMPlSVUJvu40sP3oeenhe2MRBUQizw==", "dependencies": { "@babel/runtime": "7.24.1" } diff --git a/package.json b/package.json index bf4b1bd10..9c2fa37de 100755 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@babel/runtime": "7.16.0", "@sentry/browser": "6.13.3", "@stremio/stremio-colors": "5.0.1", - "@stremio/stremio-core-web": "0.47.2", + "@stremio/stremio-core-web": "0.47.7", "@stremio/stremio-icons": "5.2.0", "@stremio/stremio-video": "0.0.38", "a-color-picker": "1.2.1",