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
For the login part everything is good, now i only need to find i a nice way to make it work with our existing setup, but iām sure i can make it work.
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,
});