Thanks for the repo. Following worked out for me with your project:
- remove the hard coded II canister ID in
webpack.config.js
new webpack.EnvironmentPlugin({
NODE_ENV: "development",
...canisterEnvVariables,
}),
- use
process.env.INTERNET_IDENTITY_CANISTER_ID
for the auth-client
await authClient?.login({
onSuccess: async () => {
initActor(authClient);
navigate("/");
},
// 7 days in nanoseconds
maxTimeToLive: BigInt(7 * 24 * 60 * 60 * 1000 * 1000 * 1000),
...(process.env.NODE_ENV === 'development' && {identityProvider: `http://localhost:4943/?canisterId=${process.env.INTERNET_IDENTITY_CANISTER_ID}#authorize`})
});
-
dfx start
+dfx deploy
+npm run start
- test on the browser on
http://localhost:8080/
Hope that helps.