When I call simple whoami function → with an agent that is authenticated I get an Invalid combined threshold signature error saying that the delegation is invalid.
public shared (msg) func whoami() : async Principal { msg.caller };
I believe it’s because I’ve set up something wrongly.
Currently I run 2 dfx replicas - one for II and one for dApp. Each on different port. I linked the II in the dApp with this URL http://rwlgt-iiaaa-aaaaa-aaaaa-cai.localhost:8888/#authorize.
Maybe the signature fails because of the intricacies of local hostnames?
Thanks for the detailed explanation! I can pretty confidently say that the issue is because the independent replicas will not accept signatures from the other.
Go through the Setting Up for Development flow again, but this time only run dfx start from the auth-client-demo directory. dfx deploy in the II directory will successfully install II on the already running replica, and everything else should work fine!
When using multiple projects at the same time, either start from new folders, or remove the .dfx folder inside the projects, and retry (usually works best with a dfx start --clean). This solved a lot of headaches for me when playing around with the Internet Identity canister and other dev canisters that I wanted to play with.