Error when calling a function with real identity

Here is the scenario (see shots below):

1 - Execute function with anonymous identity

  • Create actor based on CanCan so I can update identity when user login (see shot below)
  • Call WhoAmI function in canister with with Anonymous identity since user has not logged in yet
  • WhoAmI function executes succesfully

2 - Execute function with ‘real’ identity

  • Login with a real identity
  • Update Actor controller with new identity
  • Call WhoAmI function
  • Error

Please help…



Updated actor with new identity


You’re likely hitting the live public Internet Identity, and then trying to use that on your localhost dev environment. It won’t work, since the root keys are different for the live IC vs. your dev environment. You can either try to push your test canister to production and test there, or you can install the Internet Identity canister locally (should be able to find a tutorial on this with some googling, I remember seeing one) and authenticate against that. Both solutions will work.

2 Likes

Holy smokes…I’ve been pulling my hair for a week with this.

Let me try to install it locally.

Thanks a lot @GLdev

That was it.

Thanks again for the solution :raised_hands:

1 Like