forked from matrix/element-web
Merge pull request #13915 from vector-im/t3chguy/sso-query
Fix login loop where the sso flow returns to `#/login` to release
This commit is contained in:
commit
a607dc6822
|
@ -457,8 +457,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getSSOCallbackUrl(hsUrl: string, isUrl: string, fragmentAfterLogin: string): URL {
|
getSSOCallbackUrl(fragmentAfterLogin: string): URL {
|
||||||
const url = super.getSSOCallbackUrl(hsUrl, isUrl, fragmentAfterLogin);
|
const url = super.getSSOCallbackUrl(fragmentAfterLogin);
|
||||||
url.protocol = "riot";
|
url.protocol = "riot";
|
||||||
url.searchParams.set("riot-desktop-ssoid", this.ssoID);
|
url.searchParams.set("riot-desktop-ssoid", this.ssoID);
|
||||||
return url;
|
return url;
|
||||||
|
|
|
@ -37,12 +37,6 @@ export const updateCheckStatusEnum = {
|
||||||
export default abstract class VectorBasePlatform extends BasePlatform {
|
export default abstract class VectorBasePlatform extends BasePlatform {
|
||||||
protected _favicon: Favicon;
|
protected _favicon: Favicon;
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.startUpdateCheck = this.startUpdateCheck.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getConfig(): Promise<{}> {
|
async getConfig(): Promise<{}> {
|
||||||
return getVectorConfig();
|
return getVectorConfig();
|
||||||
}
|
}
|
||||||
|
|
|
@ -589,8 +589,10 @@ describe('loading:', function() {
|
||||||
|
|
||||||
describe('Token login:', function() {
|
describe('Token login:', function() {
|
||||||
it('logs in successfully', function() {
|
it('logs in successfully', function() {
|
||||||
|
localStorage.setItem("mx_hs_url", "https://homeserver");
|
||||||
|
localStorage.setItem("mx_is_url", "https://idserver");
|
||||||
loadApp({
|
loadApp({
|
||||||
queryString: "?loginToken=secretToken&homeserver=https%3A%2F%2Fhomeserver&identityServer=https%3A%2F%2Fidserver",
|
queryString: "?loginToken=secretToken",
|
||||||
});
|
});
|
||||||
|
|
||||||
return sleep(1).then(() => {
|
return sleep(1).then(() => {
|
||||||
|
|
Loading…
Reference in New Issue