refactor: migrate management SDK usage from go-auth0 v2 to v3 - #1597
Open
developerkunal wants to merge 1 commit into
Open
refactor: migrate management SDK usage from go-auth0 v2 to v3#1597developerkunal wants to merge 1 commit into
developerkunal wants to merge 1 commit into
Conversation
Update all go-auth0/v2 imports to go-auth0/v3 and rename the v2-flavored identifiers (APIV2, apiv2, managementv2 alias, NewAPIV2, initializeManagementClientV2) to their v3 equivalents. Regenerate the phone-notification-template mock and drop go-auth0/v2 from go.mod. No command surface or behavior changes; v3 is a near drop-in for v2 and none of the tightened v3 types are referenced.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Migrates the CLI's Management API usage from go-auth0 v2 to v3. v3 keeps v2's client initialization, package layout, and option pattern, so this is effectively an import-path change plus a naming refresh. It lays the groundwork for the upcoming priority-resource commands, which will be built on v3.
github.com/auth0/go-auth0/v2import togithub.com/auth0/go-auth0/v3across theinternal/cli,internal/auth0, andinternal/displaypackages.managementv2import alias, theAPIV2struct and itsAttackProtectionBotDetectionAPIV2/EventsAPIV2interfaces, theNewAPIV2constructor, theapiv2field on theclistruct, andinitializeManagementClientV2.make test-mocks) against the v3 interface.go-auth0/v2fromgo.mod; the repo now depends on v1 + v3.No command surface, flags, or output behavior change. None of the tightened v3 types (connection attribute identifiers, role pagination, phone backoff enum, federated tokensets, session-transfer device-binding enum) are referenced in the CLI, so the migration required no type fixes.
📚 References
Part of the CLI Priority Resource Coverage effort. This is the first PR in a stack that will add Connections, Client Grants, Flows & Forms, and Sessions + Refresh Tokens commands on top of go-auth0 v3.
🔬 Testing
go build ./...andgo vet ./...pass.internal/cli,internal/auth0,internal/display).make lintsurfaces only pre-existing issues in files untouched by this change.📝 Checklist