[英]Valid JavaScript API Domain for linkedIn to use in Chrome extension
What should be a better way to specify a valid SDK domain for LinkedIn Oauth while using it in your Chrome extension? 在Chrome扩展程序中使用LinkedIn Oauth时,为它指定有效的SDK域的更好方法是什么?
I am trying implement LinkedIn Oauth in my chrome extension and got confused because chrome extension it completely different environment than a simple web application. 我正在尝试在我的chrome扩展程序中实现LinkedIn Oauth,但感到困惑,因为chrome扩展程序与简单的Web应用程序完全不同。 Don't what should be callbacks functions. 不要使用回调函数。
If anyone has done linked Oauth with Chrome extension then please share your experience. 如果有人完成了将Oauth与Chrome扩展程序进行链接的操作,请分享您的经验。
If you're using chrome.identity
API to handle OAuth, then you can specify 如果您使用chrome.identity
API处理OAuth,则可以指定
https://<extension-id>.chromiumapp.org/<anything-here>
as your callback URL. 作为您的回调URL。 Note that no network request will actually go to that address - it'll be automatically intercepted in your extension. 请注意,实际上没有网络请求会发送到该地址-它会在您的扩展程序中自动被拦截。 See the Non-Google account authentication guide in the docs. 请参阅文档中的非Google帐户身份验证指南。
Note that this potentially involves putting your secret API keys inside the extension. 请注意,这可能涉及将您的秘密API密钥放入扩展中。 If you want to avoid that, you'll need to set up your own server to handle it for you (and not use chrome.identity
). 如果要避免这种情况,则需要设置自己的服务器来为您处理(而不是使用chrome.identity
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.