Problems with creation of Internet Identity

Hello everybody! I’m quite new in using ICP and I want to add authorization with authentication to my React.js/Motoko app. I working on it locally, so I want just to use my Internet Identity on my laptop. I havetried and successfuly created my Internet Identity on the phone. Then, when I’m starting my app using npm start from terminal and I open the appropriate address in browser, it will redirect me to a page, where I should securely connect with Internet Identity:

.
Then I choose there option to use existing and after typing my Internet Identity, I’m choosing access key – my phone name, where I receive and check confirmation message by biometrics, using my fingerprint. However, after that or even faster on my laptop I receive such message that Operation canceled. The interaction with your security device was canceled or timed out. Please try again.
image
Can anybody suggest, please, what should I do and whether do I do everything right?

@gugolsan: So you are using mainnet Internet Identity (https://identity.ic0.app) to develop an application locally?

The delegation issued by mainnet Internet Identity won’t work in you local environment because the root of trust (i.e. root key) is different in the local environment (vs mainnet).


Having said that, the support for WebAuthn via push / QR code is quite shaky unfortunately. Some device combinations work perfectly fine while others show the behavior you are experiencing. Given that the WebAuthn operations are happening outside of the Internet Identity context, there is nothing we can do to fix it (apart from maybe improving the error messages, guiding the users through workarounds).

To make your II work on both devices, I suggest you add an additional passkey for your laptop.
To do so, follow these steps:

  1. On the phone, go to https://identity.ic0.app
  2. Sign-in
  3. Select “Add new passkey”
  4. Copy the link displayed over to the laptop and open it there
  5. Follow the instructions displayed on the screen.

To run II locally see: internet-identity/demos/using-dev-build/README.md at main · dfinity/internet-identity · GitHub

These steps use the dev build flavor of II, which basically changes the authentication into a simple “continue” button, rather convenient when you switch identities a lot in your local project.

2 Likes

Unfortunately, I receive same problem. When I opened link on my desktop, I again have choosen my phone and again received same message with operation cancelled. Even if I’m not using localhost, I guess the same problem will appear.

The problem is here that this identity is important to use, cause in my demo app I give some tokens to logged in user with Internet Identity.

Unfortunately, I receive same problem. When I opened link on my desktop, I again have choosen my phone and again received same message with operation cancelled.

What you are trying to do in this flow with the link, is add a new passkey for the laptop. I.e. don’t chose phone. Use the laptop. What platform are you on? Windows?
In case of Windows, this requires Windows Hello. You can find more information about it here.

1 Like

Yes, I was again using my phone. I have followed steps that you suggested and it helped. Thank you!

1 Like