Inconsistent SSO in iOS 11
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 2k
- Forks
- 867
- Avg merge
- 4d 48m
- Merged PRs (30d)
- 1
Description
AppAuth uses SFAuthenticationSession to achieve SSO in iOS 11. This is the Apple supported way of implementing SSO on iOS 11.0+. Unfortunately, SFAuthenticationSession seems to be buggy, and SSO does not work consistently (https://twitter.com/rmondello/status/887434621989789696).
I am seeing the same behavior as reported in https://github.com/openid/AppAuth-iOS/issues/186.
Steps to reproduce bug:
Set Up
- Clone AppAuth from github
- Navigate to Examples > Example-iOS_Swift-Carthage. Run carthage bootsrap and launch Example.xcodeproj.
- Change the bundle identifier to be unique and create a project in Google Developer Console, going through the steps to create credentials for OAuth.
- Change the kIssuer, kClientID, and kRedirectURI strings in the example code appropriately using the client ID string generated in the Google Developer Console.
- Add the scheme of the redirectURI to the info.plist URL Schemes.
- Repeat steps 1 – 5 using a different bundle identifier for the second project.
Testing
- Install both apps on test device running iOS 11.0+.
- In the Settings app, find Safari and press the “Clear History and Website Data” button.
- Open the first app and press the “1. Auto” button and press “Continue” on the pop-up option
- Sign in using a google account
- Open the second app and press the “1. Auto” button and press “Continue on the pop-up option.
Expected Behavior
When the sign in page pops up in the second app, a page displaying the message “Choose an account” is shown with the account you just signed in with in a list. When you select the account, you are redirected back to the app and don’t have to type the password, having successfully signed in using SSO.
Actual Behavior
When the sign in page pops up in the second app, behavior is inconsistent. Sometimes it has the expected behavior and SSO works. Other times the sign in page pops up as if you never signed in before, and you have to reauthenticate in the second app.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the Example-iOS_Swift-Carthage project on an iOS 11.0+ test device using two apps, following the listed Google OAuth setup and SFAuthenticationSession flow. Compare the result with issue 186 and the linked Apple report; done would mean determining a project-level way to make SSO consistent, but the issue does not identify an implementation location or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, objective-c
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100