How to implement signature with user made, similarly when Amazon delivery person comes up to deliver and they asked to sign to their mobile with Node JS?
Any reference is appreciated.
I'm using Angular frontend and NodeJS backend.
What is the name of this functionality?
you can use a ready made library like this one (demo) for a Digital signature solution in this link, which uses HTML5 canvas (looks maintained, never used it myself though).
Related
I have developed my ethereum smart contract and I want to integrate it with my web application. But I don't know that is integration with ReactJS a better option or integration with nodejs a better one. Please give suggestions . Also I don't know how to do integration with backend through web3 library so please guide me about that.
When you are creating web3 app , most of the time you are not going to need a backend for that (Although you need a server to host your website) .
Working with and managing smart contracts are very easy at the front-end and there is no need for backend, but if your working on a large scale project , you are definitely going to need a backend for handling complex logics .
Next js is best option for both of that , containing node and react , also no need for manually configuring web server.
Better is next.js. I explained it here: https://ethereum.stackexchange.com/questions/129547/next-js-versus-react-which-to-use-when-for-your-dapp/130040#130040
Not every browser has metamask extension. By using next.js, when our
code is taken and rendered on the server, on the next server we can
reach out to the Ethereum network and do some initial calls like data
fetching, or alist of items in your smart contract. we execute all of
those requests on the server. That means when next.js produces Html
documents to send down to the user browser, it does not matter whether
or not users are using metamask. It does not matter whether or not
they have access to an Ethereum network. Because we already take care
of the data fetching for them. So all the users out there who are not
using metamask are going to see some information on the screen.
You've mentioned that you don't want to switch technologies, and while I agree with NextJS being a good platform to develop dApps on, I suggest you just use your current NodeJS server for anything that isn't web3 related and you use the web3js library from the frontend (your React) which would be very similar to a NextJS app anyway.
This way you don't have to switch technologies.
I have a nodejs app deployed on AppEngine with IAP enabled, so right now access to its endpoints is protected against users outside of the project's IAM and I get the "x-goog-authenticated-user-id", "x-goog-authenticated-user-email" and another jwt assertion x-goog signed header, just like it should be (as detailed here https://cloud.google.com/iap/docs/identity-howto).
In certain AppEngine environments (so far Python, Java, Go) it seems you are able to use some already provided libraries to get more information about the user with Users API, however the nodejs page is disabled (here https://cloud.google.com/appengine/docs/standard/python/users/), there seems to be no indication of what should be done there. Any ideas?
If there is no straight forward way around it would I be able to have an app engine environment that also exposes for example the Python libraries for Users API so that I can wrap around them and use them in my nodejs app?
The Users API isn't supported for Node.js. Instead, you can get the identity from the x-goog-iap-jwt-assertion header.
We don't currently have a code sample for Node.js, though this looks like one reasonable approach. (Disclaimer: I'm not a Node user, and don't know enough about Node JWT libraries to endorse any of them in particular.)
Update for the current state:
There is currently a
Identity-Aware Proxy Documentation for Node JS.
I would like to start with a disclaimer that I have no previous coding experience at all, and I have just learned HTML, CSS, JS, node.js, phaser.io, understanding all the jargon such as API, asynchronize, I/O driven, cookies & session, etc.. all that in the past 1.5 months on the web by myself, so if my question doesn't make sense please let me know.
I would ultimately like to make a cross-platform online multiplayer "webgame" (No realtime interaction between clients), I know it is ambitious but I don't mind take one step at a time, finishing the game in the period of 2-3 years on my spare time as a hobbyist, so let's move on to the actual question.
After doing all my research I decided to use phaser as client framework, PhoneGap to compile for crossplatform, and node.js + passport + mongodb for server, user authentication and storage. Since there are no realtime element between clients, and there are more tutorial on using express along with the stack of backend packages mentioned above. I am more keen on using http protocol with express then using websocket or socket.io.
Now I have created a simple login screen with input field using phaser-input plugin, and a button to send the data out. I am surprised when I cannot find any Phaser API on http request.
Q:Are there any Phaser API to do a http POST or GET request? if not is it possible to implement jQuery Ajax (does phaser include the jQuery library already or do I need to include the script as well?)? And if I should use socket.io anyway?
I am working on a phonegap project that use html as login screen too.
First. Yes and no, Phaser itself is just a framework. Phaser 's not a library. But if you want to make http request, i suggest create a Network.js that abstract all of your network call on different platform .I think you can use:
IOS: use Cordova http request.
Android: use Ajax is fine. Yes and it is possible to use jquery. Cordova, Phongap, IONic is nothing more than a web view. So you can use whatever js library you like.
Web: use Ajax too.
to access/write to a feed from the browser / Javascript, this answer says that you have to
Generate a token on the server (using API key+secret),
Provide that token to the client (just render it somewhere)
Use the token from in JS when accessing the feed
My problem now is that I basically have no server side. My app uses Polymer, so everything is running on the client and I have no way of creating those tokens (my app is served through Firebase, and I guess all it does is serve the html files).
With the polymer/firebase setup, can I still use getstream.io somehow?
Thanks!
We don't have any interaction with Firebase directly, so you'd still need some piece of middleware to handle API calls and generating these tokens.
It's an interesting idea, though. I'll add a TODO item to look into Firebase interactivity via a plugin in the future.
I am curious if it is possible to use the Stripe API within a CouchApp. Normally I would have server side code that has my Stripe API keys where I would do the transactions from. Since a CouchApp doesn't really have that server side layer I am at a loss as to how to accomplish this.
Try stripe.js:
Stripe.js makes it easy to collect credit card (and other similarly
sensitive) details without having the information touch your server
https://stripe.com/docs/stripe.js
On the back end you'll want to use stripe's node implementation. Refer to link
https://stripe.com/docs/tutorials/charges
You could also want to reference firebase implementation of stripe https://zapier.com/zapbook/firebase/stripe/
NOTE: Don't confuse firebase with couchdb. Same concept slight different engines. Firebase is built on top of mongodb, whereas CouchDB has it's own engine and for all intents and purpose intended to be along side pouchDB.
Hope it helps.