AuthenticationServices , Single sign-on (SSO) problem

Dear all,


I want to do authorization in my app, I use ASAuthorizationSingleSignOnProvider, ASAuthorizationSingleSignOnRequest, and


ASAuthorizationController to complete our work. I got an error as the following.


[SOServiceConnection] <SOServiceConnection: 0x283639180>: XPC connection interrupted

[SOServiceConnection] XPC error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.AppSSO.service-xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.AppSSO.service-xpc was invalidated from this process.}

[SOAuthorization] no SPI authorization delegate


How to I fix it. This is my sample code.


do

{

ASAuthorizationSingleSignOnProvider *ssoProvider = [ASAuthorizationSingleSignOnProvider authorizationProviderWithIdentityProviderURL:[NSURL URLWithString:@"OurURL"]];

if(ssoProvider==nil)

{

break;

}

//////////////////////////////////////////////////


ASAuthorizationSingleSignOnRequest *request = [ssoProvider createRequest];

if(request==nil)

{

break;

}

NSURLQueryItem *item1 = [NSURLQueryItem queryItemWithName:@"name1" value:@"value1"];

NSURLQueryItem *item2 = [NSURLQueryItem queryItemWithName:@"name2" value:@"value2"];

NSURLQueryItem *item3 = [NSURLQueryItem queryItemWithName:@"name3" value:@"value3"];

request.requestedScopes = @[ASAuthorizationScopeFullName, ASAuthorizationScopeEmail];

request.authorizationOptions = @[item1,item2,item3];

//////////////////////////////////////////////////


ASAuthorizationController *authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[request]];


if(authorizationController==nil)

{

break;

}


authorizationController.delegate = self;

authorizationController.presentationContextProvider = self;

[authorizationController performRequests];

}

while (0);



Thanks for you.

Which identity provider you used in your project? Which Extension you are using "Redirect" or "Credential"?

AuthenticationServices , Single sign-on (SSO) problem
 
 
Q