Add support for redirecting to external pages after logout (#7905)
* Add support for redirecting to external pages after logout This is primarily useful for deployments where the account is managed and needs to be logged out in other places too, like an SSO system. See docs for more information. * Add e2e test and fix Windows instructions * Fix performance gathering stats * use logger
This commit is contained in:
parent
ac36234068
commit
a5ce1c9dcb
9 changed files with 152 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||
Copyright 2019 - 2022 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -40,3 +40,14 @@ export const measureStop = function(session: ElementSession, name: string): Prom
|
|||
window.mxPerformanceMonitor.stop(_name);
|
||||
}, name);
|
||||
};
|
||||
|
||||
// TODO: Proper types on `config` - for some reason won't accept an import of ConfigOptions.
|
||||
export async function applyConfigChange(session: ElementSession, config: any): Promise<void> {
|
||||
await session.page.evaluate((_config) => {
|
||||
// note: we can't *set* the object because the window version is effectively a pointer.
|
||||
for (const [k, v] of Object.entries(_config)) {
|
||||
// @ts-ignore - for some reason it's not picking up on global.d.ts types.
|
||||
window.mxReactSdkConfig[k] = v;
|
||||
}
|
||||
}, config);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue