krpeacock / auth-client-demo

Example demo of how to use https://www.npmjs.com/package/@dfinity/auth-client to make authenticated calls to an IC app
https://vasb2-4yaaa-aaaab-qadoa-cai.ic0.app/
74 stars 32 forks source link

403 response for authenticated call to local dfx host #2

Closed digitaldoggo closed 3 years ago

digitaldoggo commented 3 years ago

I was having some trouble with using @dfinity/auth-client when running with local dfx tool and then stumbled upon this repo. It seems I am having the same issue when running this example auth client implementation.

The following call fails with 403 response in this sample application:

const response = await actor.whoami();

Error:

Error: Server returned an error:
  Code: 403 (Forbidden)
  Body: Failed to authenticate request

I am wondering if there is something I am missing.

Any help is greatly appreciated :)

digitaldoggo commented 3 years ago

Disregard. I think I might be asking about this in the wrong place. I believe the answer I was looking for is here: https://forum.dfinity.org/t/dfinity-auth-client-403-response/3618