I figured it out, i needed to trigger the login like this after the eth wallet authentictation
(note that i created aliasses for isConnected and identity)
Body: Failed to authenticate request 0xe8e61072aef5a719597f716ac0d01b7537d5263a58133cb8b73c77b01fb64a13 due to: Canister SOME_CANISTER_ID is not one of the delegation targets
Yes, you need to trigger the signature request from the frontend domain listed in the SIWE message. Otherwise warning. Not all wallets do this unfortunately so there still remains a phishing risk with SIWE login in combination with wallets that do not fully support the SIWE protocol.
The salt is used during the creation of user seeds, together with the ethereum address of calling user and (possibly) the frontend url. Internet Identity uses it the same way.
Is there anything additional that you have to do to be able to make authenticated calls?
I implemented an app similar to the ic-siwe-react-demo-ts except for using ic-use-actor. I do receive a delegated identity when calling the hooks provided in the ic-use-siwe-identity package:
const { identity } = useSiweIdentity();
However, when I run ic.caller() in the backend, I still get returned an anonymous principal.
If you are not using ic-use-actor then you need to create an authenticated actor yourself. Have you done that?
From the ic-use-actor code:
const agent = new HttpAgent({ identity, ...httpAgentOptions });
if (process.env.DFX_NETWORK !== "ic") {
agent.fetchRootKey().catch((err) => {
console.warn(
"Unable to fetch root key. Check to ensure that your local replica is running"
);
console.error(err);
});
}
const actor = Actor.createActor<typeof context>(idlFactory, {
agent,
canisterId,
...actorOptions,
});
To be honest now I start hating ICP for this
every time I want to implement something it is just a huge pain in the ass
I worked with more complex things but this
No docs
Not much examples
and when I do exactly like the available example still getting more errors
ic-use-siwe-identity.js?v=23e6d2d1:254 Uncaught (in promise) Error: No Ethereum address available. Call login after the user has connected their wallet.
at loginWithMetaMask (BackendContext.tsx:149:23)
at handleMetaMaskLogin (loginButton.tsx:72:11)
Errors are gone after using the rainbow way, but Still getting more issues
it is asking to Sign Messages const { openConnectModal } = useConnectModal();
You would have to use dfx deploy frontend --ic when deploying to IC. When running locally, omitting it is ok, running instead using yarn like you describe.
This thread is moving very far away from its original topic. Please start a new thread focused on your particular issues.