How to open website in webview as user signed in chrome?

618 views Asked by At

I'm going to open google hangouts site in webview of my chrome packaged app as user signed in chrome.
I can get auth token that way:

chrome.identity.getAuthToken({ 'interactive': true }, function(token) {
    console.log(token);
});

but in webview I can see sign in page instead of hangouts site. It seems that webview doesn't have access to auth token.

Here is code displaying webview:

<webview id="id1" partition="persist:googlepluswidgets" src="http://g.co/hangout" style="width:100%;height:100%;"></webview>

Any ideas to share auth token with webview and open site directly, without log in?
Is it at all possible to do it using auth token? If not, is there another method to authorize user while opening that site in webview?

0

There are 0 answers