diff --git a/src/Lifecycle.js b/src/Lifecycle.js index f65dffa006..527394da4d 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -203,9 +203,6 @@ export function handleInvalidStoreError(e) { function _registerAsGuest(hsUrl, isUrl, defaultDeviceDisplayName) { console.log(`Doing guest login on ${hsUrl}`); - // TODO: we should probably de-duplicate this and Login.loginAsGuest. - // Not really sure where the right home for it is. - // create a temporary MatrixClient to do the login const client = Matrix.createClient({ baseUrl: hsUrl, diff --git a/src/Login.js b/src/Login.js index 893ec42097..c31a9308a8 100644 --- a/src/Login.js +++ b/src/Login.js @@ -81,26 +81,6 @@ export default class Login { return flowStep ? flowStep.type : null; } - loginAsGuest() { - const client = this._createTemporaryClient(); - return client.registerGuest({ - body: { - initial_device_display_name: this._defaultDeviceDisplayName, - }, - }).then((creds) => { - return { - userId: creds.user_id, - deviceId: creds.device_id, - accessToken: creds.access_token, - homeserverUrl: this._hsUrl, - identityServerUrl: this._isUrl, - guest: true, - }; - }, (error) => { - throw error; - }); - } - loginViaPassword(username, phoneCountry, phoneNumber, pass) { const self = this;