Problems Deploying Internet Identity Locally

Hey guys,

I’ve been having trouble trying to deploy a local copy of the internet identity. I followed the steps given in for running II locally. Specifically, I used dfx start from the /internet_identity folder, followed by II_ENV=development dfx deploy --no-wallet --argument '(null)'. Then I deployed the whoami canister to the same IC replica and started the front end from the demos folder

I am able to use the “whoami” button to call the canister without issue if I don’t login, but when I try to login I get stuck trying to confirm my device registration for a new II anchor:

I also tried running dfx start from the /internet_identity/demos/whoami folder and then deploying both canisters to that replica. Doing it this way I don’t get stuck but I end up with a 403 (Forbidden) error stating:

Failed to authenticate request 0xb5c4a510754b5da7da2ee92fbc456f62c1dcde311e44e221a2969a30614bda42 due to: Invalid delegation: Invalid public key: Algorithm Placeholder not supported: Unsupported public key

Has anyone faced similar issues? Any advice is much appreciated :pray:

Did you try this?


However, you can see the II integration here (unfortunately the dfx version 0.7.2 is a little outdated here)

You’re probably trying to use Windows Hello, but your local replica doesn’t support RSA signatures yet. The version of the replica dfx ships probably is too old.

For local testing you can either use a Yubikey (or equivalent) if you have one or Chrome’s Virtual Authenticator. At some point in the future Windows Hello will also work.


I’m pretty sure we got the Windows Hello replica version into 0.8.1

The virtual authenticator worked, thank you! Also for reference, this was using dfx 0.8.1 so I guess Windows Hello support hasn’t made it into that replica yet.

I get redirected to app with keys but get error. Not sure if anyone has seen this error before.

Hi, @cyberowl
Try to set host without ?canisterId. And as far as I know replica’s default URL is

new HttpAgent({
	identity, // your identity
	host: '',

Did you run II and app on the same port? Now I get POST 404 (Not Found) because I am running on diff port

yes, but not in dev-server-mode. In my case:

dfx start --background

# start II first
cd ../internet-identity
rm -rf ./.dfx
II_ENV=development dfx deploy --no-wallet --argument '(null)'
echo "http://localhost:8000?canisterId=$(dfx canister id internet_identity)"
# II canister has rk4pc... canisterId in this setup

# deploy my app
cd ../my-app
dfx deploy
open http://localhost:8000?canisterId=$(dfx canister id my-app) # opens deployed application not in dev-mode

Then in my app

const client = await AuthClient.create({});
await client.login({
  identityProvider: window.location.href.includes('localhost') ? '' : '',
  onSuccess: async () => { 
    const identity = client.getIdentity();

    const agent = new HttpAgent({
	   host: window.location.href.includes('localhost') ? '' : undefined,

    // Make deal with agent

If you are using dev-server-mode (webpack, vite, etc), you need to add proxy

proxy: {
  '/api': 'http://localhost:8000'

Just in case somebody finds this via google: setting up Internet Identity locally is easier now, see the example here.