internet-identity icon indicating copy to clipboard operation
internet-identity copied to clipboard

How to local test II 2.0?

Open ufoscout opened this issue 4 months ago • 6 comments

I am have a working local dfx configuration with internet_identity_dev.wasm release-2025-08-22. When I try to log in through internet-identity, the canister shows the previous UI instead of the new 2.0 one, like in https://id.ai. Is there any way to enable it?

ufoscout avatar Aug 26 '25 10:08 ufoscout

Yes, you can enable it by adding II's localhost URL to the init parameter new_flow_origins when deploying Internet Identity canister.

I'm hoping to make it the default soon 😄

lmuntaner avatar Aug 26 '25 11:08 lmuntaner

@lmuntaner do you have an example? This still shows the old UI:

  dfx deploy internet_identity  --argument "
  (opt record { 
      new_flow_origins = opt vec { \"https://id.ai\" };
  })"

ufoscout avatar Aug 26 '25 12:08 ufoscout

Instead of id.ai you need to put the URL where your II is running on localhost, something like "http://.localhost:{port}"

lmuntaner avatar Aug 27 '25 08:08 lmuntaner

Still not working:

sha256sum ./target/artifacts/internet_identity.wasm.gz
30d9ccec1ac75431943331d69b5cce3f585b1c0f09e2a7fac771182e0fab3440  ./target/artifacts/internet_identity.wasm.gz
dfx deploy internet_identity  --argument "
  (opt record { 
      new_flow_origins = opt vec { \"http://rdmx6-jaaaa-aaaaa-aaadq-cai.raw.localhost:8000\" };
  })"

ufoscout avatar Aug 27 '25 09:08 ufoscout

@ufoscout can you try these step Enter in browser console: __featureFlags.DISCOVERABLE_PASSKEY_FLOW.set(true) Add to URL: ?feature_discoverable_passkey_flow=true Add origin to new_flow_origins in canister deployment config

baolongt avatar Aug 27 '25 10:08 baolongt

What @baolongt suggests will also work.

What URL do you see in your browser when you access II in localhost?

lmuntaner avatar Aug 27 '25 10:08 lmuntaner