Remove dead Login.loginAsGuest()
This commit is contained in:
parent
650185e578
commit
0e7688da98
2 changed files with 0 additions and 23 deletions
|
@ -203,9 +203,6 @@ export function handleInvalidStoreError(e) {
|
||||||
function _registerAsGuest(hsUrl, isUrl, defaultDeviceDisplayName) {
|
function _registerAsGuest(hsUrl, isUrl, defaultDeviceDisplayName) {
|
||||||
console.log(`Doing guest login on ${hsUrl}`);
|
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
|
// create a temporary MatrixClient to do the login
|
||||||
const client = Matrix.createClient({
|
const client = Matrix.createClient({
|
||||||
baseUrl: hsUrl,
|
baseUrl: hsUrl,
|
||||||
|
|
20
src/Login.js
20
src/Login.js
|
@ -81,26 +81,6 @@ export default class Login {
|
||||||
return flowStep ? flowStep.type : null;
|
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) {
|
loginViaPassword(username, phoneCountry, phoneNumber, pass) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue