denislexic
denislexic

Reputation: 11352

Node webkit and Google OAuth

Just starting out with node webkit and I'm simply loading a website through an iframe to start...(I know, dirty but gets the job done with 2 hands and a bit of time).

<iframe src="http://somewebsite.com"></iframe>

The thing is, I have Google login for the site, which creates a pop up on the website. For some reason, it doesn't in node-webkit and I can't find any doc about enabling popups...

The code I'm using for the Google login is the default one they give us on the site: https://developers.google.com/accounts/docs/OAuth2Login

I'm currently not setting anything exciting in the node-webkit configuration:

"window": {
    "toolbar": true,
    "width": 1024,
    "height": 768,
    "min_width": 300,
    "min_height": 300,
    "position": "center",
    "resizable": true,
    "show_in_taskbar": true,
    "icon": "www/resources/img/icon.png"
},

So my question is, how can I enable popups on node-webkit from an iframe to get the Google OAuth working? Thanks in advance for your help.

Upvotes: 5

Views: 837

Answers (2)

tekrat
tekrat

Reputation: 115

Sicne this has been posted "node-remote" has change slightly. Here is an example:

"node-remote": "*://*",

Direct Links:

Upvotes: 1

Guillaume Acard
Guillaume Acard

Reputation: 419

I had the same issue and managed to fix it by authorizing the node context to remote sites.

Simply add the node-remote configuration item to your package.json file. (But be warned that this can cause some libraries to load differently as they will detect the change in context).

{
    node-remote : "*" // Or the src url of your iframe
}

Google login should be working fine after that.

Upvotes: 1

Related Questions