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

Use ASWebAuthenticationSession to display OIDC account management URL #7671

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

hughns
Copy link
Member

@hughns hughns commented Sep 8, 2023

Fixes #7668

Pull Request Checklist

  • I read the contributing guide
  • UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
  • Accessibility has been taken into account.
  • Pull request is based on the develop branch
  • Pull request contains a changelog file in ./changelog.d
  • You've made a self review of your PR
  • Pull request includes screenshots or videos of UI changes
  • Pull request includes a sign off

This is so that the cookies/context are shared with the sign in and system browser.

Fixes #7668
@@ -195,14 +197,19 @@ final class UserSessionsFlowCoordinator: NSObject, Coordinator, Presentable {
}

private func openDeviceLogoutRedirectURL(_ url: URL) {
guard let window = self.presentationAnchor else {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels very wrong to me, but I wasn't sure how to do it better.

@hughns hughns marked this pull request as ready for review September 8, 2023 15:39
@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.36% 🎉

Comparison is base (5cbd1df) 11.85% compared to head (a31327b) 12.22%.
Report is 11 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7671      +/-   ##
===========================================
+ Coverage    11.85%   12.22%   +0.36%     
===========================================
  Files         1648     1650       +2     
  Lines       163748   163832      +84     
  Branches     67186    67241      +55     
===========================================
+ Hits         19412    20021     +609     
+ Misses      143698   143165     -533     
- Partials       638      646       +8     
Flag Coverage Δ
uitests 54.96% <ø> (-0.09%) ⬇️
unittests 6.07% <0.00%> (+0.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...Modules/Authentication/SSO/SSOAccountService.swift 0.00% <0.00%> (ø)
...uthentication/SSO/SSOAuthenticationPresenter.swift 0.00% <0.00%> (ø)
.../Authentication/SSO/SSOAuthenticationService.swift 0.00% <ø> (ø)
...curity/ManageSession/ManageSessionViewController.m 0.00% <0.00%> (ø)
Riot/Modules/Settings/SettingsViewController.m 0.00% <0.00%> (ø)
...ions/Coordinator/UserSessionsFlowCoordinator.swift 0.00% <0.00%> (ø)

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pixlwave pixlwave requested review from stefanceriu and removed request for pixlwave and Velin92 September 12, 2023 09:58
@sonarcloud
Copy link

sonarcloud bot commented Sep 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.14) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@pixlwave
Copy link
Member

@hughns I added an extra commit that uses the existing SSOAuthenticationPresenter so we have consistency between auth and account on iOS 14 too. (iOS 14 uses a SFSafariViewController during login due to a bug with guided access).

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@hughns hughns merged commit b07ade1 into develop Sep 12, 2023
11 checks passed
@hughns hughns deleted the hughns/oidc-aware-webview branch September 12, 2023 17:05
Fang-NB-Plus pushed a commit to innet8/element-ios that referenced this pull request Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change flow for OIDC account management web view content
3 participants