Build a Desktop App with Electron and Authentication

Build a Desktop App with Electron and Authentication

Learn how to build a desktop application using Electron and React, then add authentication with OIDC.

nikivancic

Despite the recent update (Sep 19), I am getting a TSC compilation problem shown below. What am I doing wrong?

https://uploads.disquscdn.c…

Matt Raible

A similar issue was reported recently:

https://github.com/oktadeve…

I’ll take a look when I’m back from vacation next week.

nikivancic

The problem is in the file flow.ts, which does not agree with the type definitions in node_modules/@openid/appauth/built folder

Matt Raible

I fixed the problem in this pull request. I’ll update this blog post next week with these changes.

Matt Raible

This blog post and its example have now been updated. Please let me know if you find any issues.

Alejandro Guardiola

Hello, I am doing the same thing but using Angular the problem is it does not compile it throws errors like Can’t resolve ‘child_process’ in everything that has to be with nodejs I guess it does not recognize nodejs, any solution to this problem?

Matt Raible

Can you please provide steps to reproduce this problem? Does it happen if you clone the GitHub repo, configure it for Okta, and run it?

Alejandro Guardiola

I figured out, I had to change the module in the tsc file to AMD cuz electron runs in a node runtime and those libraries are node specific.

Matt Raible

Thanks for reporting back and letting us know how you fixed it. :+1:

aman1993

Hey, how do I change the default local host port ot to something else