- From: Thai Pangsakulyanont via GitHub <sysbot+gh@w3.org>
- Date: Wed, 10 Apr 2024 13:43:12 +0000
- To: public-web-nfc@w3.org
The NFC tools app has these 2 menu items:
- Set password
- Remove password

The **Set password**, when pressed, asks for a password. Then it makes the NFC tag read-only (writes will fail). It is similar to locking the NFC tag with `.makeReadOnly()` but it is temporary. If you can provide the same password to the **Remove password** function, the unlocks the NFC, making it read-write.
Therefore, I'd suggest the following API (name should be changed but you get the idea):
```js
NDEFReader.makeReadOnlyWithUnlockPassword('the-unlock-password') // => Promise
NDEFReader.unlockWithPassword('the-unlock-password') // => Promise
```
--
GitHub Notification of comment by dtinth
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/659#issuecomment-2047583866 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 10 April 2024 13:43:13 UTC