Closed lesiki closed 2 years ago
Alternatively, is there any way to add more verbose logging so that I can try to narrow this down?
I figured out how to add the email to the token using Auth0 rules, as described here: https://github.com/tokusumi/fastapi-cloudauth/issues/4#issuecomment-698318481
Hi there,
This is almost certainly user error & not a bug, as I'm new to Auth0.
In Auth0, I have configured an application (which is a VueJS client) set up as well as an API (my FastAPI back-end).
I've managed to get authentication working using the example
def main_endpoint_test(current_user: AccessUser = Depends(auth.claim(AccessUser)))
- when I do this, I can get the user_id/sub, but I don't get the user email.I tried using the other approach shown in the example:
def secure_user(current_user: Auth0Claims = Depends(get_current_user)):
. When I use this, I always get a 401 response. I have initialised theget_current_user
passing in thedomain
andclient_id
as shown in the example - because the domain is working fine in the simpler auth method, maybe my mistake is entering the wrong value for theclient_id
?What is the client ID value should I be setting here, is it my Auth0 Application's client ID (i.e. the one for the VueJS client)? Is it the custom API's ID (as far as I can tell, there is no field explicitly labelled "client ID" in auth0's APIs)?