Use a universal link for the OIDC callback. (#1681)

This commit is contained in:
Doug
2023-09-28 14:12:57 +01:00
committed by GitHub
parent 718e01f3bc
commit ec3f5d425e
9 changed files with 162 additions and 53 deletions
@@ -120,10 +120,15 @@ final class AppSettings {
/// The URL that is opened when tapping the Learn more button on the sliding sync alert during authentication.
let slidingSyncLearnMoreURL: URL = "https://github.com/matrix-org/sliding-sync/blob/main/docs/Landing.md"
/// The redirect URL used for OIDC.
let oidcRedirectURL: URL = "io.element:/callback"
/// 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 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.