我想使用chrome.identity http://developer.chrome.com/apps/app_identity.htmlChrome 打包应用程序中的 API,允许用户进行身份验证github http://developer.github.com/v3/oauth/.
从应用程序方面来看,我很满意:
chrome.identity.launchWebAuthFlow(
{'url':'https://github.com/login/oauth/authorize?client_id=clientidgoeshere','interactive':true},
functionToTakeRedirectURL
);
但我不确定 github 端的重定向 URL 应该是什么。当应用程序上线时,我会将重定向网址设置为https://appidgoeshere.chromiumapp.org https://appidgoeshere.chromiumapp.org在 github 应用程序页面上,但我认为在应用程序上线之前该 url 不可用。
有人知道在编写应用程序时将重定向指向哪里吗?
我正在使用 Dart 编写应用程序chrome.dart https://github.com/dart-gde/chrome.dart库,但我认为如果我用纯 JavaScript 编写,也会存在同样的问题。
您可以使用chrome.identity.getRedirectURL https://developer.chrome.com/apps/identity#method-getRedirectURL因此您不必在应用程序中对重定向 URL 模式进行硬编码。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)