Skip to content

Release v2.0.0-beta.0#601

Merged
developerkunal merged 1 commit into
v2from
release/v2.0.0-beta.0
Sep 8, 2025
Merged

Release v2.0.0-beta.0#601
developerkunal merged 1 commit into
v2from
release/v2.0.0-beta.0

Conversation

@developerkunal

Copy link
Copy Markdown
Contributor

Auth0 Go SDK v2.0.0-beta.0 🚀

⚠️ BREAKING CHANGES - Major Rewrite

This is a complete rewrite of the Auth0 Go SDK generated from OpenAPI specifications with significant improvements and breaking changes.

🎯 What's New

  • 🔧 OpenAPI-Generated: Complete rewrite generated from Auth0's OpenAPI specifications
  • 📦 Better Organization: Hierarchical package structure with logical subpackages
  • 🛡️ Type Safety: Strongly typed request/response objects replace generic interfaces
  • ✨ Enhanced Developer Experience: Better IntelliSense, code completion, and documentation
  • 🚀 Future-Proof: Easier maintenance and updates as Auth0's API evolves

💥 Breaking Changes

Change v1 v2
Module Import github.com/auth0/go-auth0 github.com/auth0/go-auth0/v2
Initialization management.New() client.New()
Manager Access mgmt.User.List() mgmt.Users.List()
Request Types Generic &management.Client{} Specific &management.CreateClientRequestContent{}
Configuration String options Typed option.RequestOption

📝 Quick Migration Example

Before (v1):

import "github.com/auth0/go-auth0/management"

mgmt, err := management.New(domain,
    management.WithClientCredentials(ctx, clientID, clientSecret))

client := &management.Client{
    Name: auth0.String("My App"),
    AppType: auth0.String("spa"),
}
err := mgmt.Client.Create(ctx, client)

After (v2):

import (
    "github.com/auth0/go-auth0/v2/management"
    "github.com/auth0/go-auth0/v2/management/client"
    "github.com/auth0/go-auth0/v2/option"
)

mgmt, err := client.New("your-domain.auth0.com",
    option.WithClientCredentials(ctx, clientID, clientSecret))

request := &management.CreateClientRequestContent{
    Name: "My App",
    AppType: &management.ClientAppTypeEnumSpa,
}
response, err := mgmt.Clients.Create(ctx, request)

🔧 Migration Steps

  1. Update imports: Change to github.com/auth0/go-auth0/v2
  2. Client initialization: Use client.New() with new option pattern
  3. Manager names: mgmt.Usermgmt.Users, mgmt.Clientmgmt.Clients
  4. Request objects: Use specific request types instead of generic structs
  5. Type safety: Use provided enums instead of string literals

✅ What's NOT Affected

The authentication package remains unchanged! All authentication APIs work the same way between v1 and v2.

📚 Resources

⚠️ Beta Release

This is a beta release. While core functionality is stable, minor API adjustments may occur before the final v2.0.0 release. Please test thoroughly and provide feedback!


Install: go get github.com/auth0/go-auth0/v2

@developerkunal developerkunal requested a review from a team as a code owner September 8, 2025 12:22
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v2@434e794). Learn more about missing BASE report.

Additional details and impacted files
@@         Coverage Diff          @@
##             v2    #601   +/-   ##
====================================
  Coverage      ?   2.02%           
====================================
  Files         ?     287           
  Lines         ?   83610           
  Branches      ?       0           
====================================
  Hits          ?    1690           
  Misses        ?   81806           
  Partials      ?     114           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arpit-jn arpit-jn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@developerkunal developerkunal merged commit 8c98141 into v2 Sep 8, 2025
6 checks passed
@developerkunal developerkunal deleted the release/v2.0.0-beta.0 branch September 8, 2025 14:10
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.

3 participants