mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:02:10 +00:00
Use Safari for OIDC account URL. (#1591)
* Handle RP-Initiated Logout URL. Safari is only used on devices, the simulator doesn't work properly.
This commit is contained in:
@@ -306,13 +306,13 @@ class ClientProxy: ClientProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func logout() async {
|
||||
func logout() async -> URL? {
|
||||
await Task.dispatch(on: clientQueue) {
|
||||
do {
|
||||
// We aren't currently handling the RP initiated sign out URL.
|
||||
_ = try self.client.logout()
|
||||
return try self.client.logout().flatMap(URL.init(string:))
|
||||
} catch {
|
||||
MXLog.error("Failed logging out with error: \(error)")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
|
||||
func sessionVerificationControllerProxy() async -> Result<SessionVerificationControllerProxyProtocol, ClientProxyError>
|
||||
|
||||
func logout() async
|
||||
func logout() async -> URL?
|
||||
|
||||
func setPusher(with configuration: PusherConfiguration) async throws
|
||||
|
||||
|
||||
@@ -116,8 +116,8 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func logout() async {
|
||||
// no-op
|
||||
func logout() async -> URL? {
|
||||
nil
|
||||
}
|
||||
|
||||
var setPusherErrorToThrow: Error?
|
||||
|
||||
Reference in New Issue
Block a user