Valid JavaScript API Domain for linkedIn to use in Chrome extension

◇◆丶佛笑我妖孽 提交于 2019-12-02 09:37:57

问题


What should be a better way to specify a valid SDK domain for LinkedIn Oauth while using it in your Chrome extension?

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. Don't what should be callbacks functions.

If anyone has done linked Oauth with Chrome extension then please share your experience.


回答1:


If you're using chrome.identity API to handle OAuth, then you can specify

https://<extension-id>.chromiumapp.org/<anything-here>

as your callback 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.


Note that this potentially involves putting your secret API keys inside the extension. 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).



来源:https://stackoverflow.com/questions/37386255/valid-javascript-api-domain-for-linkedin-to-use-in-chrome-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!