How to use auth0 with electron and external user agent (browser)

I want to implement an authentication in my electron app.

The “Best Practices for Native Apps” article says that

the best current practice is to perform the OAuth authorization request in an external user agent (typically the browser) rather than an embedded user agent (such as one implemented with web-views).

source: OAuth 2.0 Best Practices for Native Apps

I want to implement the exact same flow from the article:

How to achieve that? Where should I begin? I’m stucked at the first step, which is

  1. Client app opens a browser tab with the authorization request.

From where can I get the URL that I should open in the browser?

There is an electron tutorial here: Build and Secure an Electron App - OpenID, OAuth, Node.js, and Express but unfortunately it uses builtin web views instead of an external user agent (browser)

2 Likes

Have you implemented it @sympi, could you please share how you implemented this?