I'd like to create a page inside my application to enable end-users to manage the OAuth applications that have access to their account. This is a standard feature for all OAuth providers. How can this be implemented with Apigee?
This is what I've figured out, but it seems overly complex.
- Fetch all access tokens for a user by iterating over `oauth2/search` while filtering with `enduser` (there's no filter for active only)
- Fetch each token to get the `appId`
- Find the unique set of app IDs across all tokens
There are several problems with this:
- No way to tell if an application's access has already been revoked (access tokens are revoked, but are refresh tokens revoked too?)
- The set of access tokens can be large, so it needs to be done as a background job