This diff fixes an annoying bug constantly reported on support channel (here's an example), where new keys were generated on GUI before sending them to the server, leading to the following error message:
This issue gets fixed by updating user keys only when the /user/key request succeeds.
How to test on dev environment
Create a new user: pictl usernew test@example.com test password --verify
login
go to Account > Identity
open the network panel on your browser to get the verificationtoken
Click on the "Create new identity" button
write down the verificationtoken (on production mode, the verification token will be sent to user's email).
Create another identity (you can do that multiple times)
Navigate to /user/key/verify?verificationtoken=<your-verificationtoken>
Done! (on current master, that's when the bug happens).
Closes #2841
This diff fixes an annoying bug constantly reported on support channel (here's an example), where new keys were generated on GUI before sending them to the server, leading to the following error message:
This issue gets fixed by updating user keys only when the
/user/key
request succeeds.How to test on dev environment
pictl usernew test@example.com test password --verify
verificationtoken
verificationtoken
(on production mode, the verification token will be sent to user's email)./user/key/verify?verificationtoken=<your-verificationtoken>