Fix getOidcCallbackUrl for Element Desktop (#29711)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-04-11 15:44:22 +01:00
committed by GitHub
parent bcd396e19e
commit c929eedd81

View File

@@ -479,7 +479,7 @@ export default class ElectronPlatform extends BasePlatform {
const url = super.getOidcCallbackUrl();
url.protocol = "io.element.desktop";
// Trim the double slash into a single slash to comply with https://datatracker.ietf.org/doc/html/rfc8252#section-7.1
if (url.href.startsWith(`${url.protocol}://`)) {
if (url.href.startsWith(`${url.protocol}//`)) {
url.href = url.href.replace("://", ":/");
}
return url;