<ol>
<li>Integrate with a browser wallet (Nami, ccvault, ...) so users can log in with their wallet on your web-app.</li>
<li>Let the users sign a message to prove they really own the wallet. Check on server side if the signature is correct.</li>
<li>Get all NFTs owned by the wallet from the blockchain. Don't trust the user input here as it could be manipulated. You can run your own node, use <a href="https://blockfrost.io" rel="nofollow noreferrer">https://blockfrost.io</a> or something similar.</li>
<li>Keep track of which NFTs have already been used to claim your physical goods. The address of the owner is not relevant, since the NFT can be sold after redeeming. You can do this in a simple database if you want. Or you could do it on-chain, e.g. by minting a &quot;redeemed&quot; token for each NFT or even updating the NFT metadata (if the policy is not locked yet).</li>
</ol>

CC BY-SA 4.0
2022-02-11T12:50:00.293Z
2022-02-11T12:50:00.293Z
eddex
<p>The only two ways would be to keep a database of tokens and their redemption status, or an easier way to do it would be to update a data attribute inside of the NFTs metadata directly. That way everyone can know (even on the secondary market) whether the redemption has been spent or not. This, however, would require an open policy ID.</p>

CC BY-SA 4.0
2022-02-11T14:10:17.973Z
interesting, i had not considered modifying the nft its self, i will definitely be taking a look at this !
kannastor
CC BY-SA 4.0
2022-02-11T12:47:47.897Z
2022-02-11T12:47:47.897Z
Tygar Pool
<p>I would like users to be able to perform a one time action on a web app, i.e. claiming one physical item per NFT owned, what would be the best way to keep track of tokens that have already claimed ownership? I have thought of constructing a list of addresses in the web app code but think this may have security issues. Is it possible to do it in a public way so that users can verify themselves?</p>
<p>Thank you!</p>

<nft><native-assets><nami><webapp>
How can I grant an NFT holder a one time action in a web app?
# How can I grant an NFT holder a one time action in a web app?

(Asked by: username_0 on 2022-02-11)

I would like users to be able to perform a one time action on a web app, i.e. claiming one physical item per NFT owned, what would be the best way to keep track of tokens that have already claimed ownership? I have thought of constructing a list of addresses in the web app code but think this may have security issues. Is it possible to do it in a public way so that users can verify themselves?

Thank you!

**Tags:** nft, native-assets, nami, webapp

---

## 2 answers

### Answer by username_1 on 2022-02-11. Score: 1

1. Integrate with a browser wallet (Nami, ccvault, ...) so users can log in with their wallet on your web-app.
2. Let the users sign a message to prove they really own the wallet. Check on server side if the signature is correct.
3. Get all NFTs owned by the wallet from the blockchain. Don't trust the user input here as it could be manipulated. You can run your own node, use <https://blockfrost.io> or something similar.
4. Keep track of which NFTs have already been used to claim your physical goods. The address of the owner is not relevant, since the NFT can be sold after redeeming. You can do this in a simple database if you want. Or you could do it on-chain, e.g. by minting a "redeemed" token for each NFT or even updating the NFT metadata (if the policy is not locked yet).


---

### Answer by username_2 on 2022-02-11. Score: 0

The only two ways would be to keep a database of tokens and their redemption status, or an easier way to do it would be to update a data attribute inside of the NFTs metadata directly. That way everyone can know (even on the secondary market) whether the redemption has been spent or not. This, however, would require an open policy ID.

> **Comments:**
> **username_0**: interesting, i had not considered modifying the nft its self, i will definitely be taking a look at this !  

---

