Replies: 3 comments 4 replies
-
Hail, @timorobin 👋 Welcome to Fief's kingdom! Our team will get back to you very soon to help. In the meantime, take a minute to star our repository ⭐️ Farewell! |
Beta Was this translation helpful? Give feedback.
-
Hi @timorobin 👋 It's definitely a bug of our Python client, following the changes in 0.18.2. The tenant name should not be stripped of the relative URL. The workaround you describe is indeed the right way to go! I'll fix the client ASAP 👍 |
Beta Was this translation helpful? Give feedback.
-
I have the same error and I am not sure, if it's a configuration issue or a bug? If you can see sensitive data, I don't care much, because those will be regenerated anyways:
Do you need any further info? |
Beta Was this translation helpful? Give feedback.
-
I am self-hosting fief as a GCP cloud run service and integrating into my fastapi backend. When I configure the client to use a new tenant I've created manually in the fief app, I enter my client id, client secret, get redirected to the fief ui, log in as the new user I just made, and then get redirected back to the fastapi-generated docs. All goes well, but the issue is when I call an authenticated endpoint, I get a JWK error.
After some debugging I figured out that when the
_get_endpoint_url
method was called withabsolute=False
the relative path returned would include the tenant name first, while the httpx client we build has a base url with the tenant name as well. This resulted in the request beinghttps://<main base url>/<tenant_name>/<tenant_name>/.well-known/jwks.json
and similar for the get user info request. If I specify the base url without the tenant, openid config we get is scoped for the main fief admin 'tenant' not the tenant I just created.I fixed this subclassing the
FiefAsync
and adding an optionaltenant_name
attribute. So when I init the class, I pass in the base url, without any tenant name involved and I manually prefixed the authorize and token url attributes with the tenant name. I also overwrote the_get_openid_configuration_request
to account for the tenant name attribute.This seems to have fixed my issues, but is there anything I'm not realizing?
Beta Was this translation helpful? Give feedback.
All reactions