0
クロームの拡張子を持っています。私は、ドアキーパを使用して私のレールアプリにoauth2クライアントとして使用したいと思います。私が持っている内線でoauth2の流れクロム拡張子付きのドアキーパを使用
chrome.identity.launchWebAuthFlow(
{'url': 'http://localhost:3000/oauth/authorize?client_id=98c0af01eec1004144f32a6fd5d114b40efcd01771e24a7190f2acd06ac552c8&redirect_uri=https://galaiojniedmogfplghkjnmcfnlbpbpg.chromiumapp.org?response_type=code&scope=', 'interactive': true},
function(redirect_url) {
/* Extract token from redirect_url */
console.log(redirect_url)
}
);
これは、私のレールアプリケーションでサインインするように要求するウィンドウを起動します。このウィンドウにサインインして閉じるとconsole.log
が実行されますが、redirect_url
はundefined
です。
doorkeeperの管理者でこのクライアントのコールバックURLはhttps://galaiojniedmogfplghkjnmcfnlbpbpg.chromiumapp.org/
で、chrome.identity.getRedirectUrl()
を呼び出して取得しました。
私はここで何が欠けていますか?
[GitHub](https://github.com/GoogleChrome/chrome-app-samples#_sample_github-auth)のサンプルを[ユーザー認証](https://developer.chrome.com/)にチェックしてください。 apps/app_identity)のドキュメント。これは、 'launchWebAuthFlow'のgoogle実装のサンプルを示し、これを基本参照として、redirect_urlがなぜ定義されていないのかを追跡します。お役に立てれば。 –