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

Add support for sessions and refresh-tokens for Users in the Management API #653

Open
5 tasks done
jak opened this issue Jun 26, 2024 · 2 comments · May be fixed by #654
Open
5 tasks done

Add support for sessions and refresh-tokens for Users in the Management API #653

jak opened this issue Jun 26, 2024 · 2 comments · May be fixed by #654
Labels
feature request A feature has been asked for or suggested by the community

Comments

@jak
Copy link
Contributor

jak commented Jun 26, 2024

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

I'd like to access these resources:

Describe the ideal solution

Something like:

managementAPI.users().listSessions()
managementAPI.users().listRefreshTokens()
managementAPI.users().deleteSessions()
managementAPI.users().deleteRefreshTokens()

It'd require a Session entity being added, and likely a RefreshToken entity. The API puts refresh tokens in an array called sessions but it is not look like the same entity from the documented schema.

Alternatives and current workarounds

No response

Additional context

No response

@jak jak added the feature request A feature has been asked for or suggested by the community label Jun 26, 2024
@jak
Copy link
Contributor Author

jak commented Jun 26, 2024

I'm looking at creating a PR here. According to the docs, the sessions and refresh tokens URLs do not support "classic" pagination, only the "next"/"take" approach which seems to be called checkpoint pagination in the code base. The current codebase doesn't seems to support a pagination concept without the properties start/length/total and limit. The "next" property is always consumed in addition.

My suggestion is to not use the Page abstract in these instances, as they add a number of properties that are not expected to be on the responses.

Is that approach acceptable?

@jak jak linked a pull request Jun 26, 2024 that will close this issue
5 tasks
@tanya732
Copy link
Contributor

Hi @jak

Thank you for pointing it out !!

Yes, the approach is acceptable. This CheckpointPage class can be used for responses that follow the checkpoint pagination approach, avoiding the unnecessary properties from the Page abstract class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants