OAuth inside Electron apps?

I am working on an app in Electron that uses OAuth to connect with one of my servers, which in turn uses OAuth to connect with Twitter.

It’s very standard stuff for an app running in a browser, but this app is running in Electron.

So here’s the question..

I need a callback URL to send to the server after the user has given permission to use their credentials.

I tried the one that we use at startup, but it doesn’t work:

mainWindow.loadURL (“file://” + __dirname + “/index.html”);

So I did the only thing I could think of — I created a tiny little HTTP server running inside my app on port 1501, and that does work, with one caveat.

When the program starts up the user has to acknowledge that it’s okay for my app to listen on this port. That’s pretty much a bummer, not quite a deal-stopper.

So, I’m wondering if you or someone you know has done an OAuth app inside Electron, and can tell me what callback URL they used.

If you have a clue, please send email to dave.winer@gmail.com or reply here. Thanks!

PS: I have done lots of searching and reading and coding before posting this here.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.