onlydustxyz / starklings

An interactive tutorial to get you up and running with Starknet
309 stars 83 forks source link

Connect Wallet Mechanism #229

Closed sxxnx closed 2 years ago

sxxnx commented 2 years ago

using https://www.npmjs.com/package/get-starknet

Mechanism to connect an user is split in 3 steps :

  1. Call /fetchUserInfo given the connected wallet
  2. If we have data, then the user is connected, else
  3. Make a signature, validate it and call /registerUser with wallet_address & signature