Skip to content

Securely authenticate Web3 users in Web2 backends using a challenge-response mechanism with Ethereum signatures and JWTs

License

Notifications You must be signed in to change notification settings

wiredsoft-xyz/secure-web3-web2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building Secure Web3 to Web2 connections

Overview

sequenceDiagram
    participant dApp
    participant Backend

    dApp->>Backend: Request challenge for Ethereum address
    Backend-->>dApp: Sends challenge (e.g., a random string)
    dApp->>dApp: Signs the challenge with private key
    dApp->>Backend: Sends signed challenge
    Backend->>Backend: Verifies signature using public key
    Backend-->>dApp: Returns JWT if verification succeeds
Loading

Setup

pnpm i

Run

Backend

pnpm run backend:dev

Dapp

pnpm run dapp:dev

About

Securely authenticate Web3 users in Web2 backends using a challenge-response mechanism with Ethereum signatures and JWTs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published