I'm using Google Developer Console and Oauth to develop a chrome extension so that user can login by google account.But I can not redirect to url like this
chrome-extension://<id>
.
So how can this be solved ?
I'm using Google Developer Console and Oauth to develop a chrome extension so that user can login by google account.But I can not redirect to url like this
chrome-extension://<id>
.
So how can this be solved ?
I know this is an older question, but I wondered too. You have to use the built in chrome API for accessing your extension's HTML.
chrome.extension.getURL('options.html')
Send redirect url from a content script to a background page:
chrome.extension.sendRequest({redirect: "http://redirect"});
In a background page update tab's url which would cause redirect:
chrome.extension.onRequest.addListener(function(request, sender) {
chrome.tabs.update(sender.tab.id, {url: request.redirect});
});
Refer: How do I redirect to a URL using a Google Chrome Extension & Content Script?