openid / AppAuth-iOS

iOS and macOS SDK for communicating with OAuth 2.0 and OpenID Connect providers.
https://openid.github.io/AppAuth-iOS
Apache License 2.0
1.78k stars 776 forks source link

Unable to use the library on iOS11 #133

Closed aranjan closed 7 years ago

aranjan commented 7 years ago

I see SFAuthenticationSession has been incorporated for iOS11, but this does not work on iOS11 Simulator. I get multiple redirects on safari page and then it does not show google-login page.

Attached is the screenshot for the same. simulator screen shot - iphone 7 - 2017-07-28 at 09 58 29

Console log as below:

2017-07-28 09:57:55.493391+0200 Example-iOS_ObjC[10529:2536199] *** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL
2017-07-28 09:58:04.272676+0200 Example-iOS_ObjC[10529:2536199] Fetching configuration for issuer: https://accounts.google.com
2017-07-28 09:58:05.429993+0200 Example-iOS_ObjC[10529:2537610] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1003
2017-07-28 09:58:06.222379+0200 Example-iOS_ObjC[10529:2537610] [BoringSSL] Function boringssl_context_get_peer_sct_list: line 1559 received sct extension length is less than sct data length
2017-07-28 09:58:08.004542+0200 Example-iOS_ObjC[10529:2536199] Got configuration: OIDServiceConfiguration authorizationEndpoint: https://accounts.google.com/o/oauth2/v2/auth, tokenEndpoint: https://www.googleapis.com/oauth2/v4/token, registrationEndpoint: (null), discoveryDocument: [<OIDServiceDiscovery: 0x608000010d90>]
2017-07-28 09:58:08.008932+0200 Example-iOS_ObjC[10529:2536199] Initiating authorization request with scope: openid profile
2017-07-28 09:58:09.241839+0200 Example-iOS_ObjC[10529:2536199] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/amitranjan/Library/Developer/CoreSimulator/Devices/72DC3D19-A965-4DF8-899A-B39EE4F0AB00/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-07-28 09:58:09.243663+0200 Example-iOS_ObjC[10529:2536199] [MC] Reading from private effective user settings.
2017-07-28 09:58:09.605819+0200 Example-iOS_ObjC[10529:2536199] API error: (null) returned 0 width, assuming UIViewNoIntrinsicMetric
2017-07-28 09:58:09.605933+0200 Example-iOS_ObjC[10529:2536199] API error: (null) returned 0 width, assuming UIViewNoIntrinsicMetric
2017-07-28 09:58:14.626413+0200 Example-iOS_ObjC[10529:2536923] [MC] Invalidating cache
WilliamDenniss commented 7 years ago

I believe this is just a bug in the simulator when talking to accounts.google.com. It works on real beta devices.

Note that we have a special branch for the 11 beta, details in #120.