How to do oauth 2.0 in electron shell - javascript

I am trying to build an application which will consume an api. it has a oauth 2.0 authentication. my gui framework is electron shell (https://github.com/atom/electron) is there any framework or node package to do this easily ? My doubt is the callback URL is NATted behind some router. how do i do this ?

There's a nice example of how to do oAuth authentication in an electron app using Github API. Also if you search in github.com you will find a lot of projects using electron and implementing oauth like Gitify does here.

Related

How to implement Biometric Fingerprint based Authentication in a ReactJS Web Application With Nodejs backend powered by MongoDB

I am currently working on a web application set up using ReactJS/Electron for the front-end, Nodejs for the back-end and MongoDB for the database. I want to implement a Fingerprint based authentication-attendance System using external USB scanner which when plugged in to the computer; it will be used for user authentication on the login page of the web application (using ReactJS).
How can this be implemented, is there any NPM package I should be using or any other webAPI that can help with this?
Here's a great NPM package for an OpenSaaS biometric authentication provider: https://www.npmjs.com/org/loginid
You can read the documentation here: https://docs.loginid.io/Server-SDKs/Node/node-get-started

Tap Payment Gateway in React Native and Nodejs

I am developing and integrating the Tap Payment gateway in React-native (Expo) and Nodejs , anyone can help me that how to Integrate Tap payment in React-native and Nodejs
You can hit their APIs which are also available for the Nodejs as well for creating the token and then making the payment request easily, you may use got npm for making the API request from Nodejs.
Check this link TAP API DOC - https://www.tap.company/kw/en/developers

Creating a react-native app for IOS and I have created a Microsoft SQL server, how to connect these two?

I have an app built on react native and I want to connect to a database that i have made on the Microsoft SQL server. I have searched online and there are things like myssql but I still get errors with that. I followed this tutorial nodejs from the official Microsoft website, and it works with the nodejs and I use node to run it, but how can i use this in my react native project?
You can use AXIOS to make requests to your NodeJS Server
In Android you can access your localhost by the IP 10.0.2.2 (default proxy configured in your Android Virtual Device).
In iOS you can just use localhost
Remember to add the port assigned your NodeJS Server and the
protocol http
Example URL for Android: http://10.0.2.2:3000
You need to write back-end service code.I suggest you to use Asp.Net Web API .You can use Entity Framework.
Also you can use PHP,Java or Python...

Firebase can't authenticate after building electron app

I have a problem with Firebase, React and Electron. When I use my app in dev, I use the localhost to load with react-scripts start , so it's loading in http://localhost:3000. I use this url to load my app with Electron.
BUT when I am trying to go in production, I use the electron-builder. I build my app with react-script build, it's create the build folder, and for the electron app, I change the loading url for file://${path.join(__dirname, "../build/index.html" I use build -c.extraMetadata.main=build/electron.js. It's now loading perfectly. BUT When I try to authenticate nothing happen and in the console, it says :
code : auth/operation-is-not-supported-in-this-environnement
message : This operation is not supported in the environnement this is running on. "location.protocol" must be http, https or chrome extension and web storage must be enable
How I can resolve this ?
My hypothesis it's because I don't write the url of my app in Authorized domains in Firebase Sign in method, but there is no url for my app, it's local. Does I need to load a server to employ Firebase ?
I see a similar post but without answer
I think it's because the SDK thinks it's running from a Node.js server environment. Currently, OAuth sign in with popup or redirect is not supported in Electronjs. You would need to get an OAuth credential from an electron compatible library and use the signInWithCredential API.
Firebase is looking into supporting signInWithPopup/Redirect in this environment.

How to set up authentication layer in node.js app using ntlm

How to setup authentication in node.js application using ntlm ?
node.js is serving the webpages that need to be authenticated for windows user only, using ntlm. How to set up this authentication layer ?
Use the passport module https://www.npmjs.com/package/passport with the windowsauth strategy https://github.com/auth0/passport-windowsauth
Use the express-ntlm package if you are using Express. No passwords to deal with on your end.
https://www.npmjs.com/package/express-ntlm

Categories