How to fix: OIDC discovery advertises implicit-grant response types
The authorization-server metadata advertises a response type that returns a token from the authorization endpoint. The advertised value is "token" or "id_token token", neither of which comes with a code.
Why it matters
Any client that reads this document is told the implicit grant is available. A token returned that way lands in the URL fragment, so it reaches browser history, third-party scripts on the callback page, and anything that logs full URLs, and it is issued without client authentication or PKCE.
This describes what the server advertises, not what any particular client uses, so it is a Low finding rather than a confirmed weakness. It still matters: OAuth 2.0 Security Best Current Practice (RFC 9700) says the implicit grant must not be used and OAuth 2.1 removes it, so an advertised implicit response type is a migration that has not finished. Turning it off in the metadata is only cosmetic unless the authorization endpoint stops honouring it too.
How to fix it
- 1Migrate remaining clients to authorization code with PKCE.
- 2Remove implicit entries from response_types_supported once no client depends on them.
- 3Reject response_type=token and response_type=id_token token at the authorization endpoint, not only in the metadata.
Code examples
Metadata after migration
{
"response_types_supported": ["code"],
"grant_types_supported": ["authorization_code", "refresh_token"],
"code_challenge_methods_supported": ["S256"]
}References
Detected automatically by VulnRadar. The check id is api-oidc-discovery-implicit-flow-supported, stable across every scan so you can filter or diff on it.
More api checks
- LowTRACE method referenced in API response body
- InfoREST endpoint allows DELETE
- LowGraphQL introspection field suggestions
- MediumGraphQL endpoint has no rate-limit headers
- LowOpenAPI server URL leaks internal host
- LowCORS preflight result not cached
- HighBearer token in URL query string
- MediumJSONP callback parameter accepted
Questions
- How severe is OIDC discovery advertises implicit-grant response types?
- VulnRadar rates this low severity in the api category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id api-oidc-discovery-implicit-flow-supported, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does OIDC discovery advertises implicit-grant response types map to?
- It maps to CWE-522. In the OWASP Top 10 it falls under A07:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.