Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete individual consent sessions via API #3842

Open
5 tasks done
alnr opened this issue Sep 16, 2024 · 0 comments
Open
5 tasks done

Delete individual consent sessions via API #3842

alnr opened this issue Sep 16, 2024 · 0 comments
Labels
feat New feature or request.

Comments

@alnr
Copy link
Contributor

alnr commented Sep 16, 2024

Preflight checklist

Ory Network Project

No response

Describe your problem

Currently, we can revoke all consent sessions (and their associated token chains) for a particular client, or all consent sessions for a particular client/subject pair. See https://www.ory.sh/docs/reference/api#tag/oAuth2/operation/revokeOAuth2ConsentSessions

We cannot, however, revoke an individual consent session through this API.

Describe your ideal solution

  1. Clean up the API reponses from GET /admin/oauth2/auth/sessions/consent
image

This is confusing, since we call the challenge the ID of the consent session.

In GET /admin/oauth2/auth/requests/consent, however, the challenge parameter in the response will be the long AEAD string, which is not the same as the challenge ID.
This needs to be disambiguated. See also this line of code.

  1. Add a consent_session_id or consent_challenge_id or consent_id query parameter (nomenclature to be decided in step 1) to DELETE /admin/oauth2/auth/sessions/consent which deletes only this one consent session (~= row in hydra_oauth2_flow) and the associated token chain.
    This ID must already be fixed before the flow is persisted and be returned from GET /admin/oauth2/auth/requests/consent so the consent UI can insert it into access+refresh tokens.

Workarounds or alternatives

Not sure.

Version

2.1+

Additional Context

Medium prio

@alnr alnr added the feat New feature or request. label Sep 16, 2024
@ory ory deleted a comment from alnr Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant