Always use WAS for the account URL page. (#1634)

This commit is contained in:
Doug
2023-09-05 17:54:15 +01:00
committed by GitHub
parent c9962a4459
commit d182202c78
2 changed files with 5 additions and 13 deletions
@@ -89,20 +89,11 @@ final class SettingsScreenCoordinator: CoordinatorProtocol {
return return
} }
#if targetEnvironment(simulator) // Note to anyone in the future if you come back here to make this open in Safari instead of a WAS.
let canOpenURL = false // Safari can't access the cookie on the iOS 16 simulator 🤷‍♂️ // As of iOS 16, there is an issue on the simulator with accessing the cookie but it works on a device. 🤷‍♂️
#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 = OIDCAccountSettingsPresenter(accountURL: accountURL, presentationAnchor: window)
accountSettingsPresenter?.start() accountSettingsPresenter?.start()
} }
}
private func presentAnalyticsScreen() { private func presentAnalyticsScreen() {
let coordinator = AnalyticsSettingsScreenCoordinator(parameters: .init(appSettings: ServiceLocator.shared.settings, let coordinator = AnalyticsSettingsScreenCoordinator(parameters: .init(appSettings: ServiceLocator.shared.settings,
+1
View File
@@ -0,0 +1 @@
Revert to using a Web Authentication Session for OIDC account management.