🐛 Bug Report: API "List OIDC clients" paging is broken #173

Closed
opened 2025-10-07 23:56:15 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @dougmeredith on GitHub.

Reproduction steps

#!/bin/bash

curl -L 'https://sso.test.dstrc.org/api/oidc/clients?limit=5&page=2' \
-H 'Accept: */*' \
-H 'X-API-KEY: 4UNTNF8qonRzxaCgYaG7wH7nKTEj6gY4'

(test server not even Internet accessible; nobody needs to panic about the details above lol)

Expected behavior

This should return clients 6-10.

Actual Behavior

It returns clients 1-20.

  "pagination": {
    "totalPages": 2,
    "totalItems": 21,
    "currentPage": 1,
    "itemsPerPage": 20
  }

Version and Environment

v1.2.0

Log Output

No response

Originally created by @dougmeredith on GitHub. ### Reproduction steps ``` #!/bin/bash curl -L 'https://sso.test.dstrc.org/api/oidc/clients?limit=5&page=2' \ -H 'Accept: */*' \ -H 'X-API-KEY: 4UNTNF8qonRzxaCgYaG7wH7nKTEj6gY4' ``` (test server not even Internet accessible; nobody needs to panic about the details above lol) ### Expected behavior This should return clients 6-10. ### Actual Behavior It returns clients 1-20. ``` "pagination": { "totalPages": 2, "totalItems": 21, "currentPage": 1, "itemsPerPage": 20 } ``` ### Version and Environment v1.2.0 ### Log Output _No response_
OVERLORD added the bug label 2025-10-07 23:56:15 +03:00
Author
Owner

@dougmeredith commented on GitHub:

This may not be related, but I just noticed that the log file reports the API call twice, when there is just a single call.

@dougmeredith commented on GitHub: This may not be related, but I just noticed that the log file reports the API call twice, when there is just a single call.
Author
Owner

@dougmeredith commented on GitHub:

I see the same behavior with "List user groups". I also noticed that they aren't sorted by name, which the documentation says is the default.

@dougmeredith commented on GitHub: I see the same behavior with "List user groups". I also noticed that they aren't sorted by name, which the documentation says is the default.
Author
Owner

@stonith404 commented on GitHub:

Thanks for debugging this. The docs should be correct in the next release.

@stonith404 commented on GitHub: Thanks for debugging this. The docs should be correct in the next release.
Author
Owner

@dougmeredith commented on GitHub:

From watching the log file while using the web UI, it turns out that the documentation is wrong. The following works:

#!/bin/bash

curl -L 'https://sso.test.dstrc.org/api/oidc/clients?pagination\[limit\]=5&pagination\[page\]=2' \
-H 'Accept: */*' \
-H 'X-API-KEY: 4UNTNF8qonRzxaCgYaG7wH7nKTEj6gY4'
@dougmeredith commented on GitHub: From watching the log file while using the web UI, it turns out that the documentation is wrong. The following works: ``` #!/bin/bash curl -L 'https://sso.test.dstrc.org/api/oidc/clients?pagination\[limit\]=5&pagination\[page\]=2' \ -H 'Accept: */*' \ -H 'X-API-KEY: 4UNTNF8qonRzxaCgYaG7wH7nKTEj6gY4' ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#173