1
iOS 앱에서 사용자 확인을 위해 Google의 OAuth2를 사용하려고합니다.iOS : OAuth2Client 및 Google
OAuth2Client API를 사용하고 있지만 Google과 호환되지 않습니다. Google은 http : // localhost 또는 urn : ietf : wg : oauth : 2.0 : oob을 리디렉션 URL로 허용하는 것으로 보입니다. 사용자 정의 스키마를 사용하지 못하게하여 내 앱으로 다시 전환합니다.
코드는 다음과 같습니다
[[NXOAuth2AccountStore sharedStore] setClientID:@"<client-id>"
secret:@"<secret>"
authorizationURL:[NSURL URLWithString:@"https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile"]
tokenURL:[NSURL URLWithString:@""]
redirectURL:[NSURL URLWithString:@"http://localhost"]
forAccountType:@"Google"];
[[NXOAuth2AccountStore sharedStore] requestAccessToAccountWithType:@"Google"];
내가 그것을 실행하면, 사파리가 표시 및 액세스 요청,하지만 난 다시 응용 프로그램으로 리디렉션 할 수 없기 때문에 다음 내동댕이.
누구나이 작업을 수행하는 방법을 알고 있거나 다른 API가 필요합니까? 참고 : 현재 Google 툴박스 OAuth2 키트 ATM에 액세스 할 수 없습니다.