Fix Native OIDC for Element Desktop (#12253)
* Reuse exported common type Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve client metadata used for OIDC dynamic registration Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix Native OIDC for Element Desktop by including ssoid in the url_state of the /auth call Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Reuse exported common type Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve client metadata used for OIDC dynamic registration Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix typo Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Mock PlatformPeg Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Mock platform Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update src/BasePlatform.ts Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
c71b8fdf78
commit
618462ba06
6 changed files with 23 additions and 5 deletions
|
@ -313,7 +313,11 @@ export default abstract class BasePlatform {
|
|||
return null;
|
||||
}
|
||||
|
||||
protected getSSOCallbackUrl(fragmentAfterLogin = ""): URL {
|
||||
/**
|
||||
* The URL to return to after a successful SSO/OIDC authentication
|
||||
* @param fragmentAfterLogin optional fragment for specific view to return to
|
||||
*/
|
||||
public getSSOCallbackUrl(fragmentAfterLogin = ""): URL {
|
||||
const url = new URL(window.location.href);
|
||||
url.hash = fragmentAfterLogin;
|
||||
return url;
|
||||
|
@ -478,4 +482,12 @@ export default abstract class BasePlatform {
|
|||
policyUri: config.privacy_policy_url,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Suffix to append to the `state` parameter of OIDC /auth calls. Will be round-tripped to the callback URI.
|
||||
* Currently only required for ElectronPlatform for passing element-desktop-ssoid.
|
||||
*/
|
||||
public getOidcClientState(): string {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue