Browse Source

Fix login loop where the sso flow returns to `#/login`

due to fragmentAfterLogin going back to `#/login`
and https://github.com/vector-im/riot-web/issues/11643

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/13915/head
Michael Telatynski 2 years ago
parent
commit
ddf3d92d43
  1. 4
      src/vector/platform/ElectronPlatform.tsx
  2. 6
      src/vector/platform/VectorBasePlatform.ts

4
src/vector/platform/ElectronPlatform.tsx

@ -457,8 +457,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
}
getSSOCallbackUrl(hsUrl: string, isUrl: string, fragmentAfterLogin: string): URL {
const url = super.getSSOCallbackUrl(hsUrl, isUrl, fragmentAfterLogin);
getSSOCallbackUrl(fragmentAfterLogin: string): URL {
const url = super.getSSOCallbackUrl(fragmentAfterLogin);
url.protocol = "riot";
url.searchParams.set("riot-desktop-ssoid", this.ssoID);
return url;

6
src/vector/platform/VectorBasePlatform.ts

@ -37,12 +37,6 @@ export const updateCheckStatusEnum = {
export default abstract class VectorBasePlatform extends BasePlatform {
protected _favicon: Favicon;
constructor() {
super();
this.startUpdateCheck = this.startUpdateCheck.bind(this);
}
async getConfig(): Promise<{}> {
return getVectorConfig();
}

Loading…
Cancel
Save