mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +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:
@@ -397,19 +397,25 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
}
|
||||
|
||||
Task {
|
||||
// first log out from the server
|
||||
_ = await userSession.clientProxy.logout()
|
||||
// First log out from the server
|
||||
let accountLogoutURL = await userSession.clientProxy.logout()
|
||||
|
||||
// regardless of the result, clear user data
|
||||
// Regardless of the result, clear user data
|
||||
userSessionStore.logout(userSession: userSession)
|
||||
tearDownUserSession()
|
||||
|
||||
// reset analytics
|
||||
// Reset analytics
|
||||
ServiceLocator.shared.analytics.optOut()
|
||||
ServiceLocator.shared.analytics.resetConsentState()
|
||||
|
||||
stateMachine.processEvent(.completedSigningOut(isSoft: isSoft))
|
||||
|
||||
// Handle OIDC's RP-Initiated Logout if needed. Don't fallback to an ASWebAuthenticationSession
|
||||
// as it looks weird to show an alert to the user asking them to sign in to their provider.
|
||||
if let accountLogoutURL, UIApplication.shared.canOpenURL(accountLogoutURL) {
|
||||
await UIApplication.shared.open(accountLogoutURL)
|
||||
}
|
||||
|
||||
hideLoadingIndicator()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user