From fb62f6dfb4d74b9e1e7919a74d478e3d8b2a7a17 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Thu, 28 May 2020 14:25:54 -0400 Subject: [PATCH 1/2] make IPC calls to get pickle key --- src/vector/platform/ElectronPlatform.tsx | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index f8bd22fb60..ad63e6c962 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -500,4 +500,30 @@ export default class ElectronPlatform extends VectorBasePlatform { return handled; } + + async getPickleKey(userId: string, deviceId: string): Promise { + try { + return await this._ipcCall('getPickleKey', userId, deviceId); + } catch (e) { + // if we can't connect to the password storage, assume there's no + // pickle key + return null; + } + } + + async createPickleKey(userId: string, deviceId: string): Promise { + try { + return await this._ipcCall('createPickleKey', userId, deviceId); + } catch (e) { + // if we can't connect to the password storage, assume there's no + // pickle key + return null; + } + } + + async destroyPickleKey(userId: string, deviceId: string): Promise { + try { + await this._ipcCall('destroyPickleKey', userId, deviceId); + } catch (e) {} + } } From 19ff8dde1f59c331e2c9f6183b3c7b926c50ba2b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 3 Jun 2020 20:34:20 +0100 Subject: [PATCH 2/2] fix loading test for new sso pattern Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- test/app-tests/loading-test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/app-tests/loading-test.js b/test/app-tests/loading-test.js index 64872aaac9..363be81954 100644 --- a/test/app-tests/loading-test.js +++ b/test/app-tests/loading-test.js @@ -589,8 +589,10 @@ describe('loading:', function() { describe('Token login:', function() { it('logs in successfully', function() { + localStorage.setItem("mx_hs_url", "https://homeserver"); + localStorage.setItem("mx_is_url", "https://idserver"); loadApp({ - queryString: "?loginToken=secretToken&homeserver=https%3A%2F%2Fhomeserver&identityServer=https%3A%2F%2Fidserver", + queryString: "?loginToken=secretToken", }); return sleep(1).then(() => {