mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Always use WAS for the account URL page. (#1634)
This commit is contained in:
@@ -89,19 +89,10 @@ final class SettingsScreenCoordinator: CoordinatorProtocol {
|
||||
return
|
||||
}
|
||||
|
||||
#if targetEnvironment(simulator)
|
||||
let canOpenURL = false // Safari can't access the cookie on the iOS 16 simulator 🤷♂️
|
||||
#else
|
||||
let canOpenURL = UIApplication.shared.canOpenURL(accountURL)
|
||||
#endif
|
||||
|
||||
if canOpenURL {
|
||||
UIApplication.shared.open(accountURL)
|
||||
} else {
|
||||
// Fall back to an ASWebAuthenticationSession to handle the URL inside the app.
|
||||
accountSettingsPresenter = OIDCAccountSettingsPresenter(accountURL: accountURL, presentationAnchor: window)
|
||||
accountSettingsPresenter?.start()
|
||||
}
|
||||
// Note to anyone in the future if you come back here to make this open in Safari instead of a WAS.
|
||||
// As of iOS 16, there is an issue on the simulator with accessing the cookie but it works on a device. 🤷♂️
|
||||
accountSettingsPresenter = OIDCAccountSettingsPresenter(accountURL: accountURL, presentationAnchor: window)
|
||||
accountSettingsPresenter?.start()
|
||||
}
|
||||
|
||||
private func presentAnalyticsScreen() {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Revert to using a Web Authentication Session for OIDC account management.
|
||||
Reference in New Issue
Block a user