Skip to content

MCollector/Wallet-authentication-to-CSharp-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Repo is for your frontend and middleware-backend to authorize through a secured JWT token, which can be validated by the backend to have the unique user validated. Eventually the backend will only validate the user based on the wallet-address, if the JWT token is decoded perfectly.

This has :

  • a react frontend, connecting through Injected WalletProvider (chrome extension browsers like MetaMask and Phantom)
  • after connecting, you can send a sign-transaction to the wallet
  • this is given by the node backend by a nonce hash, which gives this back to frontend
  • If the react frontend presses to sign the message, to authenticate, it's posting the signed message to the node backend, validating it as a JWT token through the both backend secrets
  • the node backend sends it to the "real" backend, the csharp part. If the JWT is succesfully decomposed by the JWT_SECRET, the user can be read by the wallet_address.

This way you can authorise users frontend on react, though let them use authorized functions on the C#-backend.

Apps

backend-node

  • npm install
  • npm run start

frontend-react

  • npm install
  • npm run start

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors