javascript - Redirect the Chrome extension popup.html page to a URL for Oauth -


is possible redirect popup html of chrome extension remote url?

i'm looking scenario purpose of oauth. when user clicks on "login fb" button,

i want html page of chrome extension redirect to: https://www.facebook.com/dialog/oauth?client_id={app-id}&redirect_uri={redirect-uri} user prompted log in.

is right approach authentication in chrome extension anyway?

popups very.. fragile. easy close, user can't use password managers fill form etc. size-constrained. maybe not best idea.

you can, instead, use chrome.windows create login-type window:

chrome.windows.create({   url: "yourloginurl",   type: "popup",   focused: true }); 

however, not "native" way oauth in chrome extensions.

the native way use chrome.identity api, chrome.identity.launchwebauthflow.

as added bonus, allows use virtual https: callback url, supported option, without having own domain.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -