<@U04UQ68083H> what is consent acceptance
# ory-copilot
o
@chilly-king-10285 what is consent acceptance
c
A message from kapa.ai
Consent acceptance in the context of Ory and OAuth 2.0 is a process where a user (the subject) gives permission to an OAuth 2.0 client to access resources on their behalf. This process is initiated when an authorization code, hybrid, or implicit OAuth 2.0 Flow is started. Here's how it works: 1. Ory asks the login provider to authenticate the subject. 2. If the subject is authenticated, they must be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on their behalf. 3. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. 4. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. 5. If the subject accepts, the endpoint
PUT /admin/oauth2/auth/requests/consent/accept
is used to tell Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, you can refer to the OAuth 2.0 documentation. For more details, you can refer to the [Ory API Reference](https://www.ory.sh/docs/reference/api) and [Ory Hydra case study](https://www.ory.sh/docs/hydra/case-study).