2
我需要在我的應用程序與asana授權。我使用OAuth2Client庫進行oauth授權。oauth授權與體式(重定向網址)
配置:
[[NXOAuth2AccountStore sharedStore] setClientID:@"my_clientID"
secret:@"my_client_secret"
authorizationURL:[NSURL URLWithString:@"https://app.asana.com/-/oauth_authorize"]
tokenURL:[NSURL URLWithString:@"https://app.asana.com/-/oauth_token"]
redirectURL:[NSURL URLWithString:@"http://localhost:3000"]// <-- this is the problem part
forAccountType:@"myService"];
請求:
[[NXOAuth2AccountStore sharedStore] requestAccessToAccountWithType:@"myService"];
它啓動Safari瀏覽器與授權,問我的權限,然後將其重定向到redirectURL
。但我應該使用什麼redirectURL
(這裏和帳戶設置),重定向回我的應用程序?或者,也許我做錯了?
在此先感謝。