Skip to content

feat(auth): add missing auth admin methods #715

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

Merged
merged 10 commits into from
May 20, 2025
Merged

feat(auth): add missing auth admin methods #715

merged 10 commits into from
May 20, 2025

Conversation

grdsdev
Copy link
Collaborator

@grdsdev grdsdev commented May 9, 2025

What kind of change does this PR introduce?

Close #680

What is the current behavior?

Missing Auth admin methods

What is the new behavior?

Adds Auth admin methods

@grdsdev grdsdev marked this pull request as ready for review May 12, 2025 20:08
@grdsdev grdsdev force-pushed the feat/auth-admin branch from cb1e3c9 to a46b194 Compare May 19, 2025 12:21
@grdsdev grdsdev requested a review from Copilot May 19, 2025 12:21
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds several missing Auth admin methods to support administrative user management functionalities while updating related tests and deprecating legacy APIs. Key changes include:

  • Updates to integration and unit tests to convert user IDs from strings to UUIDs and improved logging/formatting.
  • Introduction of new admin methods (getUserById, updateUserById, createUser, inviteUserByEmail) in AuthAdmin and related updates in APIClient.
  • Minor formatting and deprecation message improvements across the codebase.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Tests/IntegrationTests/supabase/.temp/cli-latest Updated CLI version in integration tests.
Tests/IntegrationTests/DotEnv.swift Updated Supabase keys for testing.
Tests/IntegrationTests/AuthClientIntegrationTests.swift Applied logger update and multiline formatting improvements.
Tests/IntegrationTests/.vscode/settings.json Cleaned up duplicate settings and streamlined configuration.
Tests/IntegrationTests/.vscode/extensions.json Reformatted extension recommendations.
Tests/AuthTests/RequestsTests.swift Converted user id literals to UUID objects.
Tests/AuthTests/AuthClientTests.swift Adjusted snapshot request formatting and updated UUID usage.
Sources/Helpers/AnyJSON/AnyJSON+Codable.swift Simplified JSON encoder/decoder initialization.
Sources/Auth/Types.swift Refactored decoding formatting; changed CodingKeys visibility in UserIdentity.
Sources/Auth/Deprecated.swift Improved deprecation message formatting.
Sources/Auth/Internal/APIClient.swift Refactored error handling for improved readability.
Sources/Auth/AuthAdmin.swift Added new admin methods and updated deleteUser to use UUID.
Examples/UserManagement/ProfileView.swift Updated deleteUser invocation to pass a UUID.
Comments suppressed due to low confidence (1)

Sources/Auth/Types.swift:252

  • Changing the visibility of CodingKeys in UserIdentity from 'private' to internal may expose internal details unintentionally. Please confirm that this change is deliberate and maintains the intended encapsulation.
enum CodingKeys: CodingKey {

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15112834046

Details

  • 82 of 90 (91.11%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 75.525%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Sources/Auth/Internal/APIClient.swift 8 16 50.0%
Totals Coverage Status
Change from base Build 15028289207: 0.2%
Covered Lines: 5218
Relevant Lines: 6909

💛 - Coveralls

@grdsdev grdsdev requested a review from dshukertjr May 19, 2025 12:42
@grdsdev grdsdev merged commit 04661f8 into main May 20, 2025
23 checks passed
@grdsdev grdsdev deleted the feat/auth-admin branch May 20, 2025 09:19
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.

Auth Admin Improvement
3 participants