
This helps verify that the user is logged in and who they signed in as. You are also displaying the user’s name from Okta. The logout button calls your electron API from the preload.js file. You will see output like the following when it’s finished:Ĭonst ) It will add the redirect URIs you specified and grant access to the Everyone group. The Okta CLI will create an OIDC Native App in your Okta Org. Your domain name is reversed to provide a unique scheme to open your app on a device.

Use -133337:/callback for the Redirect URI and the Logout Redirect URI Select the default app name, or change it as you see fit. If you already have an account, run okta login. Install the Okta CLI and run okta register to sign up for a new account. Create an OpenID Connect applicationīefore you begin, you’ll need a free Okta developer account. This SDK exposes a signInWithCredentials() method that you can use to authenticate your users. There are many ways to handle this, but in this article, you will use Okta’s Auth JS SDK. For some companies, allowing localhost to receive the response from Okta may pose a security concern. In his example, he used AppAuth with its PKCE extension to secure his Electron application.īoth of these approaches require a callback path where Okta can send the authentication code to be processed by your application. Matt Raible wrote a blog post about using Electron with Okta in 2018. This process is super simple to set up and use securely. The middleware takes some configuration and connects with Okta.


For example, one of the most common and popular ways to interface with Okta from a Node.js application is to use the Okta NodeJS OIDC Middleware.

This can present a new set of challenges. Since Electron uses Node on the backend, it also has access to the entire npm ecosystem that Node developers have come to rely on.Įven though it is built on Node, Electron is used for desktop applications rather than web applications. This design enables developers to quickly write and easily maintain cross-platform applications between their desktop and web applications. Electron uses HTML, JavaScript, and CSS for its front end and Node.js for its backend. Electron is one of the most popular desktop frameworks today.
