amaury1093 / login-with-metamask

Demo project for "One-click Login with Blockchain: A MetaMask Tutorial"
https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial
MIT License
679 stars 294 forks source link

Trouble locating the database so I can add token check #234

Closed ChristianOConnor closed 2 years ago

ChristianOConnor commented 2 years ago

I am trying to build an app that authenticates whether or not a user's wallet contains a particular NFT. This app looks like a great foundation for this. I was thinking of making it so that after the user signs the nonce, web3 checks if the wallet contains a particular token balance. Is this project something that could be ported to what I'm describing?

Btw the dumb part of this question is that I can't find the actual database file. Where is this file getting written to the hard drive? I see the line storage: path.join(os.tmpdir(), 'db.sqlite'), in db.ts but for some reason I can't find this path after I run the program. I know that there is a persistent db because the app remembered my nickname which I typed in after signing in with my metamask.

ChristianOConnor commented 2 years ago

Nevermind I found it. It's in my /private/var/folders/ folder followed by a really long filepath. Weird.