MCPcopy Create free account
hub / github.com/auth0/auth0-cli / openTenantCmd

Function openTenantCmd

internal/cli/tenants.go:92–113  ·  view source on GitHub ↗
(cli *cli)

Source from the content-addressed store, hash-verified

90}
91
92func openTenantCmd(cli *cli) *cobra.Command {
93 cmd := &cobra.Command{
94 Use: "open",
95 Args: cobra.MaximumNArgs(1),
96 Short: "Open the settings page of the tenant",
97 Long: "Open the tenant's settings page in the Auth0 Dashboard.",
98 Example: ` auth0 tenants open
99 auth0 tenants open <tenant>
100 auth0 tenants open "example.us.auth0.com"`,
101 RunE: func(cmd *cobra.Command, args []string) error {
102 selectedTenant, err := selectValidTenantFromConfig(cli, cmd, args)
103 if err != nil {
104 return err
105 }
106
107 openManageURL(cli, selectedTenant, "tenant/general")
108 return nil
109 },
110 }
111
112 return cmd
113}
114
115func selectValidTenantFromConfig(cli *cli, cmd *cobra.Command, args []string) (string, error) {
116 if len(args) > 0 {

Callers 1

tenantsCmdFunction · 0.85

Calls 2

openManageURLFunction · 0.85

Tested by

no test coverage detected