Make refresh_token grant type optional in DCR handler (#1651)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
gazzadownunder 2026-01-05 23:41:45 +10:00 • committed by GitHub
commit d52937b39c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,11 +73,11 @@ class RegistrationHandler:
),
status_code=400,
)
if not {"authorization_code", "refresh_token"}.issubset(set(client_metadata.grant_types)):
if "authorization_code" not in client_metadata.grant_types:
return PydanticJSONResponse(
content=RegistrationErrorResponse(
error="invalid_client_metadata",
error_description="grant_types must be authorization_code and refresh_token",
error_description="grant_types must include 'authorization_code'",
),
status_code=400,
)