Yordis PrietoY
ZITADEL15mo ago
92 replies
Yordis Prieto

FastAPI OpenIdConnect

Hey folks, I am trying to make the following to work:

from fastapi.security import OAuth2PasswordBearer,OpenIdConnect

oidc_scheme = OpenIdConnect(
    openIdConnectUrl=f"{os.getenv("ZITADEL_BASE_URL")}/.well-known/openid-configuration"
)

async def get_zitadel_principal(introspected_token: Annotated[dict, Depends(oidc_scheme)]):
    zitadel_id = introspected_token.get("sub")
    # other code


Then I visit the docs and try to use "OpenIdConnect (OAuth2, implicit)" mode, but I keep getting the following issue:

{
  "error": "unauthorized_client",
  "error_description": "The requested response type is missing in the client configuration. If you have any questions, you may contact the administrator of the application."
}


See the screenshots, I am not sure what else to try by now, I tried multiple combinations of response type, grant types (with implicit and not) ... I am just not sure what else to try by now and who is in fault here
Screenshot_2024-11-15_at_5.17.03_PM.png
Screenshot_2024-11-15_at_5.18.01_PM.png
Was this page helpful?