2017-01-03 7 views
1

Swift 3プロジェクトでhttps://github.com/p2/OAuth2ライブラリを使用しています。私はusername、password、client_id、client_secret、authorize_uri、keychainの設定でOAuth2PasswordGrantを初期化しました。 authorize関数と呼ばれています。私が得たエラーはunsupported_grant_typeでした。OAuth2PasswordGrantクラスを使用してログインできません

self.oAuth = OAuth2PasswordGrant(settings: settings) 
self.oAuth.authorize { (json: OAuth2JSON?, error: OAuth2Error?) in 
    // did sth here 
} 

答えて

0

設定データ構造を確認してください。私の経験では、URLの代わりにauthorize_uriを文字列の代わりに渡し、authorize_uriをlocalhostにデフォルト設定しました。これは無効なターゲットであり、unsupported_grant_typeエラー

関連する問題