Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always use WAS for the account URL page. #1634

Merged
merged 2 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-1634.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Revert to using a Web Authentication Session for OIDC account management.