By: Chakrapani Adepu user 06 Oct 2017 at 3:04 p.m. CDT

1 Response
Chakrapani Adepu gravatar
Hi Support Team, We are trying to implement AppAuth iOS , followed links below, https://github.com/openid/AppAuth-iOS https://gluu.org/docs/ce/3.1.0/integration/native-apps/appauth-ios/ I have done all the steps which are mentioned in above reference links. step1: we did dynamic client registration to get ClientID and registration,authorize and token endpoint urls in https://..hostname../oxauth-rp/home.htm. step2: we could to able to launch gluu browser from ios InApp browser and did login with credentials and we could able to redirect back iOS app but not able to get accessToken. In completion handler instead of getting accessToken and session time we were getting below error. Error description- NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) Authorization error: Optional("The operation couldn’t be completed. (org.openid.appauth.general error -5.)") key Apis which we used. Step - Handling the Redirect - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options { // Sends the URL to the current authorization flow (if any) which will // process it if it relates to an authorization response. if ([_currentAuthorizationFlow resumeAuthorizationFlowWithURL:url]) { _currentAuthorizationFlow = nil; return YES; } // Your additional URL handling (if any) goes here. return NO; } step1: // builds authentication request OIDAuthorizationRequest *request = [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration clientId:kClientID scopes:@[OIDScopeOpenID, OIDScopeProfile] redirectURL:KRedirectURI responseType:OIDResponseTypeCode additionalParameters:nil]; // performs authentication request AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; appDelegate.currentAuthorizationFlow = [OIDAuthState authStateByPresentingAuthorizationRequest:request presentingViewController:self callback:^(OIDAuthState *_Nullable authState, NSError *_Nullable error) { if (authState) { NSLog(@"Got authorization tokens. Access token: %@", authState.lastTokenResponse.accessToken); [self setAuthState:authState]; } else { NSLog(@"Authorization error: %@", [error localizedDescription]); [self setAuthState:nil]; } }]; Step -info ends ... Error description- NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) Authorization error: Optional("The operation couldn’t be completed. (org.openid.appauth.general error -5.)") Regards Chakrapani Adepu

By William Lowe user 10 Oct 2017 at 9:35 a.m. CDT

William Lowe gravatar
Closing this, as a [new duplicate issue](https://support.gluu.org/authentication/4616/appauth_ios-issue-nsurlsessionnsurlconnection-http-load-failed-kcfstreamerrordomainssl-9802/) has been opened.