Skip to content

Conversation

@grdsdev
Copy link
Contributor

@grdsdev grdsdev commented Nov 10, 2025

Description

This PR completes the Flutter SDK implementation of Admin OAuth methods to match the JavaScript SDK's GoTrueAdminApi OAuth functionality.

Changes

  • ✅ Added UpdateOAuthClientParams class for updating OAuth clients
  • ✅ Implemented updateClient method in GoTrueAdminOAuthApi
  • ✅ Added pagination fields (nextPage, lastPage, total) to OAuthClientListResponse
  • ✅ Added comprehensive tests for updateClient functionality and UUID validation

Comparison with JS SDK

Method JS Implementation Flutter Implementation Status
listClients Complete
createClient Complete
getClient Complete
updateClient Now Complete
deleteClient Complete
regenerateClientSecret Complete

Testing

  • Added test for updateClient functionality
  • Added test for UUID validation in updateClient
  • All existing tests continue to pass

Notes

The pagination fields (nextPage, lastPage, total) are included in the response type to match the JS SDK interface. Full header-based pagination parsing would require changes to the fetch implementation and can be addressed in a future PR if needed.

Related

- Add UpdateOAuthClientParams class for updating OAuth clients
- Implement updateClient method in GoTrueAdminOAuthApi
- Add pagination fields (nextPage, lastPage, total) to OAuthClientListResponse
- Add tests for updateClient functionality and UUID validation

This completes the Flutter SDK implementation to match the JavaScript SDK's
GoTrueAdminApi OAuth methods, providing full parity with listClients,
createClient, getClient, updateClient, deleteClient, and regenerateClientSecret.
@grdsdev grdsdev requested review from a team and Vinzent03 November 10, 2025 13:56
Simplify the updateClient test by removing optional parameter assertions
and update GoTrue test container to v2.182.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19294327110

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 20 of 22 (90.91%) changed or added relevant lines in 2 files are covered.
  • 90 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 79.75%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/gotrue/lib/src/types/types.dart 9 11 81.82%
Files with Coverage Reduction New Missed Lines %
packages/gotrue/lib/src/gotrue_client.dart 90 62.02%
Totals Coverage Status
Change from base Build 18568213555: 0.07%
Covered Lines: 3320
Relevant Lines: 4163

💛 - Coveralls

@grdsdev grdsdev merged commit 36d7334 into main Nov 12, 2025
15 of 16 checks passed
@grdsdev grdsdev deleted the feat-admin-oauth-update-list-19ca1 branch November 12, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants