Steps to run react SSO sample Application on windows

Hi
I am working on a sample application from below(git url) sample project, on windows environment.
Can someone please point me out to a help link (with all the steps)to make this project running end to end on a windows machine?

Thanks,
Surender

Hi. Iā€™m the author of the GitHub project you mentioned. Iā€™ll try to help you get started. Can you please let me know what are the issues are you facing? Iā€™m not a Windows user myself but Iā€™m pretty sure we can figure it out quite fast how to run it on Windows.

By the way, for reference, this is the article that accompanies this repo: Implementing Single Sign-On in B2C Applications

2 Likes

Hi,
Thanks for the response , I have followed the same page which you have mentioned and pretty much done everything in there.
I am able to make the servers running but when I am clicking on sign with Auth0 button on both the portals, its giving me error page.
Please let me know what should I share with you?

Here are few logs though ā€¦
events.js:167
throw er; // Unhandled ā€˜errorā€™ event
^

Error: listen EADDRINUSE :::3001
at Server.setupListenHandle [as _listen2] (net.js:1286:14)
at listenInCluster (net.js:1334:12)
at Server.listen (net.js:1421:7)
at Function.listen (C:\Users\surender.sandhu\Documents\AWS-SocialLogin\react-b2c-sso-ssoWithAuth0\react-b2c-sso-sso\server\node_modules\express\lib\application.js:618:24)
at Object. (C:\Users\surender.sandhu\Documents\AWS-SocialLogin\react-b2c-sso-ssoWithAuth0\react-b2c-sso-sso\server\server.js:52:5)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensionsā€¦js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
Emitted ā€˜errorā€™ event at:
at emitErrorNT (net.js:1313:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server@1.0.0 start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Hi,
I,am able to move forward and login into both the portals ,
But Buy Button is not working and I see ā€œError: getaddrinfo ENOTFOUND undefined undefined:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)ā€ Error in logs.
And also single Log Out is not working, You have to Logout Explicitly from both the applications.
Also Can you please help me out with having a directly going to Login page without clicking on the Sign with Auth0 Button.

Thanks,
Surender

Hi, on your previous message you added logs that contained the message above. What this means is that there is another process running on port 3001. Perhaps you started the app twice and forgot to kill the first one?

This error is happening on the backend, right? You probably forgot to set the ā€œREACT_APP_AUTH0_DOMAINā€ env variable before running your appā€¦

Now, regarding ā€œhaving a directly going to Login page without clicking on the Sign with Auth0 Buttonā€, in this article, you will find a section called ā€œAdding Features to Authenticated Usersā€. There, you will see a component called ā€œSecuredRouteā€. This component does what you want. If the user is not logged in, they are redirected to Auth0 so they can log in.

I hope that helps.