jbreckmckye / electron-auth0-login

Helper widget for Auth0 authentication in Electron desktop apps
MIT License
28 stars 19 forks source link

Helpless #19

Closed hjertefolger closed 3 years ago

hjertefolger commented 3 years ago

Hello guys,

this is not particularly an issue, just mine. You should delete this later guys.

I would like to kindly ask you if you could help me to implement your solution to basic Electron Quick Start so I could learn and understand how to do it in most simple/basic way. I've tried, but failed in every way:

  1. I've created auth.js, pasted your code and filled Auth0 credentials
    • and this is literally how far I've got

Thank you very much in advance, for your patience, effort and any help in this case! All the best, Tomas

jbreckmckye commented 3 years ago

Hello Tomas, sounds like you're having problems with your bundler and modules?

EDIT: The import issue sounds like you are trying to use TypeScript in JavaScript.

It also sounds like you're struggling with Electron more generally. For instance, the main process in Electron is the Node thread, not the browser window. You may be trying to initialise the plugin in the wrong place.

Either way it doesn't sound like a bug with the library itself, so I'm going to close the issue, but the thread will remain open in case you have any further questions.

ArsenicBismuth commented 2 years ago

Have a massive trouble myself forcing to use ES6. Node doesn't support it directly, and shouldn't be considered a default option.

jbreckmckye commented 2 years ago

@ArsenicBismuth Are you talking about ES modules? "ES6" comprises several things.

If so, you do not need to use ES modules with this library, as it is distributed in CommonJS format (config).

jbreckmckye commented 2 years ago

I think I understand the issue now: I suspect you have both used the TypeScript examples in plain JavaScript, which is causing you trouble due to not using .mjs files. I've added a comment to the examples to make this clearer.