Join Slack
Powered by
<@U04UQ68083H> when we call hydra /oauth2/auth api...
# ory-copilot
g
gorgeous-motorcycle-71764
09/04/2025, 1:14 PM
@chilly-king-10285
when we call hydra /oauth2/auth api with redirect_uri param, does hydra validate this redirect_uri value with oauth2 client's callback url ?
c
chilly-king-10285
09/04/2025, 1:14 PM
A message from
kapa.ai
chilly-king-10285
09/04/2025, 1:14 PM
Yes. Hydra validates that the redirect_uri in /oauth2/auth matches one of the client’s pre-registered redirect URLs. This is explicitly called out as a security principle (“Validate Pre-Registered 'redirect_uri'” and binding the authorization code to the redirect_uri), and troubleshooting docs emphasize that the redirect URL must be whitelisted on the client and match exactly (including query params) (["OAuth 2.0 security overview"](
https://www.ory.sh/docs/hydra/security-architecture
), ["Refresh Token flow fails"](
https://www.ory.sh/docs/hydra/debug#refresh-token-flow-fails
), ["Resolve redirect URL mismatch errors"](
https://www.ory.sh/docs/getting-started/integrate-auth/auth-js#resolve-redirect-url-mismatch-errors
)).
Open in Slack
Previous
Next