# Cannot set-pin : CTAP error: 0x30 - NOT\_ALLOWED

**URL:** <https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756>\
**Category:** Two Factor Authentication\
**Created:** [May 25, 2022, 10:14am UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756 "2022-05-25T10:14:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![eiz](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@eiz](https://onlykey.discourse.group/u/eiz)\
**Post date:** [May 25, 2022, 10:14am UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/1 "2022-05-25T10:14:22Z")

</div>

Hello,

Using OnlyKey CLI v1.2.9 I’m unable to set the FIDO2 PIN :

> onlykey-cli set-pin  
> Please enter new pin:  
> Please confirm new pin:  
> CTAP error: 0x30 - NOT\_ALLOWED

Using firmware v2.1.2-prodc

Any hint ?  
THX

---

<div class="post-metadata">

**Author:** ![eiz](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@eiz](https://onlykey.discourse.group/u/eiz)\
**Post date:** [May 25, 2022, 10:31am UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/2 "2022-05-25T10:31:50Z")

</div>

After a reset this works but this is a no-go as all existing FIDO2 credentials are lost.  
The thing is I did not set a pin previously. Could there be a default pin ?

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [May 25, 2022, 1:22pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/3 "2022-05-25T13:22:48Z")

</div>

There must have been a pin set, is it possible one of the sites registered requested to set a pin? The set-pin only works the first time setting a pin

$ onlykey-cli set-pin

Please enter new pin:

Please confirm new pin:

Done. Please use new pin to verify key

$ onlykey-cli set-pin

Please enter new pin:

Please confirm new pin:

CTAP error: 0x30 - NOT\_ALLOWED

---

<div class="post-metadata">

**Author:** ![eiz](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@eiz](https://onlykey.discourse.group/u/eiz)\
**Post date:** [May 25, 2022, 1:41pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/4 "2022-05-25T13:41:36Z")

</div>

Could a website set the PIN directly ?  
I did not even install the onlykey-cli before trying to set the pin.

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [May 25, 2022, 2:29pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/5 "2022-05-25T14:29:07Z")

</div>

> Could a website set the PIN directly ?

The first time you set up a FIDO2 login at a website it will prompt you to set a pin.

---

<div class="post-metadata">

**Author:** ![eiz](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@eiz](https://onlykey.discourse.group/u/eiz)\
**Post date:** [May 25, 2022, 2:37pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/6 "2022-05-25T14:37:07Z")

</div>

So I may have created a PIN when doing tests long time ago without knowledge this pin would stay forever.

I bet I’m not the only one. Some big warning somewhere in the documentation may be useful then.  
I guess there’s no possible way to reset the PIN without loosing the FIDO2 credentials ?

Thx.

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [May 25, 2022, 2:56pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/7 "2022-05-25T14:56:23Z")

</div>

To change your PIN:

$ onlykey-cli change-pin  
Please enter old pin:  
Please enter new pin:  
Please confirm new pin:  
Done. Please use new pin to verify key

---

<div class="post-metadata">

**Author:** ![eiz](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@eiz](https://onlykey.discourse.group/u/eiz)\
**Post date:** [May 25, 2022, 3:10pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/8 "2022-05-25T15:10:53Z")

</div>

I do not know the initial PIN…  
Is it technicaly possible for a website to set the PIN without any approval on the OnlyKey by the user ?  
I do not see any feedback needed on the OnlyKey once it is unlocked.

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [May 25, 2022, 5:38pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/9 "2022-05-25T17:38:41Z")

</div>

> Is it technicaly possible for a website to set the PIN without any approval on the OnlyKey by the user ?

No, I am not aware of any way this would be possible

---

<div class="post-metadata">

**Author:** ![eiz](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@eiz](https://onlykey.discourse.group/u/eiz)\
**Post date:** [May 26, 2022, 7:38pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/10 "2022-05-26T19:38:49Z")

</div>

What is the expected flow for the inital creation of the PIN when starting from a web page ?  
In the documentation, one must use the onlykey-cli to accheive this.  
As I never used the CLI before I wonder how this IPN was set first.

THX

---

<div class="post-metadata">

**Author:** ![eiz](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@eiz](https://onlykey.discourse.group/u/eiz)\
**Post date:** [May 31, 2022, 12:37pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/11 "2022-05-31T12:37:13Z")

</div>

Weird enough to mention it : I also checked with oen of my solokeys (correct me if I’m wrong , this is the same implementation as OnlyKey for U2F). For this one also I never installed the CLI and discovered a unknown PIN is set.

The only common point I see is that both are rather old and came with a very old firmware that I upgraded. Is it possible that a firmware upgrade could interfere somehow and set a PIN ?

THX

---

<div class="post-metadata">

**Author:** ![t11](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@t11](https://onlykey.discourse.group/u/t11)\
**Post date:** [May 31, 2022, 12:57pm UTC](https://onlykey.discourse.group/t/cannot-set-pin-ctap-error-0x30-not-allowed/756/12 "2022-05-31T12:57:55Z")

</div>

I have not been able to replicate your issue here. There is no default PIN set, there are several ways to set a PIN but they all require typing the PIN and confirming.
