0
我目前正嘗試將Azure的B2C與本機iOS應用程序連接。我已經能夠獲得一個Safari彈出窗口來返回電子郵件/ ID /響應(使用AppAuth),但我正在尋找實際使用API來完成此操作,而使用本機 iOS元素,而不是由Microsoft託管的網頁外觀和感覺俗氣。有一個更好的方法嗎?如何連接本機iOS應用程序<-> Azure B2C?
NSURL *authorizationEndpoint = [NSURL URLWithString:[NSString stringWithFormat:kEndpoint, kTenantName, kSignupOrSigninPolicy, @"authorize"]];
NSURL *tokenEndpoint = [NSURL URLWithString:[NSString stringWithFormat:kEndpoint, kTenantName, kSignupOrSigninPolicy, @"token"]];
OIDServiceConfiguration *configuration = [[OIDServiceConfiguration alloc] initWithAuthorizationEndpoint:authorizationEndpoint tokenEndpoint:tokenEndpoint];
OIDAuthorizationRequest *request = [[OIDAuthorizationRequest alloc] initWithConfiguration:configuration clientId:kClientId scopes:@[OIDScopeOpenID, OIDScopeProfile] redirectURL:[NSURL URLWithString:kRedirectUri] responseType:OIDResponseTypeCode additionalParameters:nil];
currentAuthorizationFlow = [OIDAuthState authStateByPresentingAuthorizationRequest:request presentingViewController:presentingVC callback:callback];
您是否找到了實現此目的的方法? –