The idea behind it is simple:
- When users "register" with an application, they are given an NFT which can later be used as proof of registration.
- NFTs instead of generic fungible tokens since NFTs can store user meta-data (instead of asset URI)
- The application authenticates the user (or in this case, the user's ethereum account) by checking token ownership.
Contains 2 contracts
AbstractUser.sol
is an abstract contract providing a skeleton for concrete implementations.UserExample.sol
is an example User model implementingAbstractUser.sol
- Including passwords into the implementation, and how to deal with password resets for those users who have forgotten their passwords.
- It occurs to me that passwords aren't strictly necessary. All the frontend has to do is check that the user's wallet is connected, then check token ownership. Essentially, in this case the user is signing in with their wallet private key.
- Consider this paper.
- Relevent tests
- Demo frontend