From 6a0fdb9b193d8a36c3d6ab7f412bbcd074eefea1 Mon Sep 17 00:00:00 2001 From: Doug Date: Mon, 23 Oct 2023 09:57:53 +0100 Subject: [PATCH] Revert the OIDC callback to use a custom scheme for now. Universal links are still slightly unreliable. We need to host a page at the redirect location so that if universal link detection fails we can fall back to opening the app using the scheme. --- ElementX/Sources/Application/AppSettings.swift | 9 ++------- changelog.d/1936.bugfix | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 changelog.d/1936.bugfix diff --git a/ElementX/Sources/Application/AppSettings.swift b/ElementX/Sources/Application/AppSettings.swift index 0fb15fb2b7..03ede5383c 100644 --- a/ElementX/Sources/Application/AppSettings.swift +++ b/ElementX/Sources/Application/AppSettings.swift @@ -134,13 +134,8 @@ final class AppSettings { /// Any pre-defined static client registrations for OIDC issuers. let oidcStaticRegistrations: [URL: String] = ["https://id.thirdroom.io/realms/thirdroom": "elementx"] - /// The redirect URL used for OIDC. The bundle ID suffix avoids app association conflicts between Element X, Nightly and PR builds. - let oidcRedirectURL = { - guard let bundleIDSuffix = InfoPlistReader.main.bundleIdentifier.split(separator: ".").last, - let redirectURL = URL(string: "https://mobile.element.io/oidc/\(bundleIDSuffix)") - else { fatalError("Failed creating a valid OIDC redirect URL.") } - return redirectURL - }() + /// The redirect URL used for OIDC. + let oidcRedirectURL: URL = "io.element:/callback" /// The date that the call to `/login` completed successfully. This is used to put /// a hard wall on the history of encrypted messages until we have key backup. diff --git a/changelog.d/1936.bugfix b/changelog.d/1936.bugfix new file mode 100644 index 0000000000..0040762bec --- /dev/null +++ b/changelog.d/1936.bugfix @@ -0,0 +1 @@ +Revert the OIDC redirect URL back to using a custom scheme. \ No newline at end of file