II unble to connect on localhost, but working on mainnet

Hello, anyone can help me solve this issue. recent days II login reported “unable to connect” on localhost. but on our dev envirnment on mainnet, it’s working.

Thank you

Are you sure you’re pointing AuthClient to http://localhost not https://localhost?

http://localhost can not be opened.

full path (it was always working in the past. showed this error since 2 days ago)

  1. local client points to https://localhost:3000
  2. Use II login, new window direct to https://identity.ic0.app/#authorize
  3. the page goes to https://id.ai/authorize/continue, then the error message came out

(edited)

This seems to indicate that the identityProvider option in AuthClient is currently unchanged (default value).

This is fine for production, but during development, you’ll need to point it to a local Internet Identity canister instance. You can add rdmx6-jaaaa-aaaaa-aaadq-cai to your dfx.json to have it pull a local instance of II, see: Using third-party canisters | Internet Computer.