So hi i have a question so im currently trying to figure out if lets say someone minted an NFT from a candy machine and once the mint the NFT it needs to update the metadata since the image is generated lets say from an AI. But when in the frontend how would i verify if the minted NFT that the metadata we are trying to update does belongs to that person ?. Since what i have in mind was using a signature verification but how would the flow be in this case.
1 Answer
To ensure that the owner of a particular NFT is the one interacting with your frontend you need to complete these steps:
- Learn their public key
- Assert that the owner of the NFT matches that public key
- Ask the user to sign a unique message with their private key
- Verify their signature using the message and the public key
Steps 3–4 are what passes for ‘authentication’ in crypto. Protocols such as SIWS (Sign In With Solana) can be used to make authentication ergonomic for both developers and users.