phaserjs / phaser-editor-issues

Phaser Editor's bug tracker.
0 stars 0 forks source link

Unable to login behind a corporate VPN #12

Open kittykatattack opened 4 months ago

kittykatattack commented 4 months ago

Version

Description

I'm unable to log in behind a corporate VPN. If I disconnect the VPN, everything is fine. Is it possible to set proxy settings in the Editor?

Possible solution

PhaserEditor2D commented 4 months ago

We should provide a more friendly solution, but for now, you can try the following:

kittykatattack commented 4 months ago

Thanks @PhaserEditor2D! Regarding setting HTTP_PROXY and HTTPS_PROXY, where should that be done?

PhaserEditor2D commented 4 months ago

It is a bit complex: https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac

For that reason we have to provide a friendly method.

kittykatattack commented 4 months ago

Ah, interesting - thanks! I had not idea about that.

photonstorm commented 4 months ago

@kittykatattack we're looking at making this seamless in the next release of the Editor, but just to confirm: Editor opens your default browser to handle the login - are we right in assuming your browser is configured to use the VPN already? However, once oAuth is completed, it will try to redirect back to a localhost on which the app responds to the auth request. Is it this stage that gets blocked for you?

Also, Editor will try to download a list of templates on start-up. Lots of those new ones are online only (not bundled in) - would this likely fail in your environment without being able to configure a Proxy in the Editor?

kittykatattack commented 4 months ago

However, once oAuth is completed, it will try to redirect back to a localhost on which the app responds to the > auth request. Is it this stage that gets blocked for you?

Yes, this is where we're blocked. There might be a simple solution (?), but for now we've just been using v.3.8 of the editor which doesn't have that auth loop.

photonstorm commented 4 months ago

Understood. This is an industry-standard auth loop, so I'm curious how you get around it for other apps?

kittykatattack commented 4 months ago

Understood. This is an industry-standard auth loop, so I'm curious how you get around it for other apps?

For the only other Electron app that we have used with our VPN that can sometimes require auth (for things like Github Co-Pilot) we've needed to configure the proxy settings here:

https://code.visualstudio.com/docs/getstarted/settings

But, I'm not a networking expert so beyond this, I'm just not sure. Or, maybe we need to whitelist your authentication domain somewhere...?

photonstorm commented 4 months ago

Proxy settings can be configured in the 4.2 release we've in beta now. They apply across the app itself and its internal build of node/npm, which handles automatic dependency installation for templates and build server support, that was introduced in v4.1.

The auth loop we use has nothing to do with Electron specifically, it's how apps authenticate via oAuth (Affinity Designer, Camtasia, etc all use the same method). However, if configuring proxy settings for VSCode works for your case, it should also work with Editor 4.2 too. We can provide a beta release to test with if you email us directly.

kittykatattack commented 4 months ago

Just minor update on this, in case it helps. This is the message we receive after about 20 minutes into using the editor (4.1 at the moment):

Screenshot 2024-07-17 at 17 11 42
PhaserEditor2D commented 4 months ago

Just minor update on this, in case it helps. This is the message we receive after about 20 minutes into using the editor (4.1 at the moment):

Looks like the editior server's process is dead or blocked by the operating system.

PhaserEditor2D commented 4 months ago

It would be great to see the log files. In <user>/.phasereditor/desktop.log and <user>/.phasereditor/server.log.