This repository demonstrates the integration of Genezio with Web3 wallet authentication to secure access to your application's functionalities.
- Install genezio.
npm install genezio -g
- Deploy the project. If you are not logged in, you will be redirected to login or register with a genezio account.
genezio deploy
- Go to your project on the genezio dashboard and active the Authentication for your project from the "Authentication" section.
- Activate the Web 3 Auth provider and after that copy the
Token
andRegion
values. Paste them inclient/src/App.tsx
:
// Add your own values here
AuthService.getInstance().setTokenAndRegion("<token>", "<region>");
- Deploy again the client
genezio deploy --frontend
A Web3 wallet login system allows users to securely authenticate with your platform using their digital wallets. This process utilizes blockchain technology, offering a decentralized and secure method of verification without sharing personal information. This method leverages public-key cryptography, eliminating the need for traditional username and password combinations.
What is the flow?
- Connect Wallet: User clicks "Login with Metamask" and approves the connection in their wallet.
- Sign Message: The platform sends a unique message, which the user signs with their private key via their wallet.
- Verify Signature: The platform verifies the signature using the user's public key to authenticate identity.
- Establish Session: Upon verification, the platform starts a session, granting access to the user.