Hi all. I'm trying to implement a Platform SSO extension for macOS and I'm freaking out. It's so complicated and with almost zero guidance documentation.
I established a starting point in my SSO extension and I get the registration request to my beginDeviceRegistrationUsingLoginManager
(I managed all the AASA file, MDM stuff).
In this method I'm creating a ASAuthorizationProviderExtensionLoginConfiguration
and I try to save it into the loginManager
(ASAuthorizationProviderExtensionLoginManager
which I get from the method) using saveLoginConfiguration
.
It worked fine, and without changing anything I started getting the next error:
failed to save loginConfiguration: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1000 "(null)" UserInfo={NSUnderlyingError=0x7ff77ff63b30 {Error Domain=com.apple.PlatformSSO Code=-1008 "Token endpoint URL is not approved profile URL." UserInfo={NSLocalizedDescription=Token endpoint URL is not approved profile URL.}}}
This is my configuration:
ASAuthorizationProviderExtensionLoginConfiguration *loginConfiguration = [[ASAuthorizationProviderExtensionLoginConfiguration alloc] initWithClientID:@"***" issuer:@"https://auth.platformsso.ping-eng.com/as" tokenEndpointURL:[NSURL URLWithString:@"https://auth.platformsso.ping-eng.com/as/token"] jwksEndpointURL:[NSURL URLWithString:@"https://auth.platformsso.ping-eng.com/as/jwks"] audience:@"***"];
And this is where it breaks:
BOOL saveConf = [self.loginManager saveLoginConfiguration:loginConfiguration error:&confError];
Can someone help me with this error please?
OK, I found out that a line in my associated domains caused it. Although I had the right line in there, I had another line with a diff domain that didn't match. It didn't accept me having two lines with authsrv and diff domains. Once I removed it everything started working again.