diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4674cfb65..ece98c40a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,6 +26,9 @@ jobs: - name: Check out the code uses: actions/checkout@v3 + - name: Check that docs were generated + run: make check-docs + - name: Check for go vulnerabilities run: make check-vuln diff --git a/.goreleaser.yml b/.goreleaser.yml index f69cbccdf..016089a9f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,17 +1,17 @@ # Documentation at http://goreleaser.com builds: -- main: ./cmd/auth0 - env: - - CGO_ENABLED=0 - goarch: - - amd64 - - arm64 - goos: - - darwin - - linux - - windows - binary: auth0 - ldflags: + - main: ./cmd/auth0 + env: + - CGO_ENABLED=0 + goarch: + - amd64 + - arm64 + goos: + - darwin + - linux + - windows + binary: auth0 + ldflags: - -X 'github.com/auth0/auth0-cli/internal/buildinfo.Version={{.Version}}' - -X 'github.com/auth0/auth0-cli/internal/buildinfo.Revision={{.Commit}}' - -X 'github.com/auth0/auth0-cli/internal/buildinfo.BuildUser=goreleaser' @@ -40,8 +40,7 @@ changelog: - "^docs:" - "^test:" brews: - - - name: auth0 + - name: auth0 tap: owner: auth0 name: homebrew-auth0-cli @@ -49,27 +48,27 @@ brews: name: auth0 email: support@auth0.com homepage: https://auth0.github.io/auth0-cli - description: Auth0 command-line tool to supercharge your developer workflow + description: Build, manage and test your Auth0 integrations from the command line license: MIT skip_upload: auto install: | - bin.install "auth0" + bin.install "auth0" - (bash_completion/"auth0").write `#{bin}/auth0 completion bash` - (fish_completion/"auth0.fish").write `#{bin}/auth0 completion fish` - (zsh_completion/"_auth0").write `#{bin}/auth0 completion zsh` + (bash_completion/"auth0").write `#{bin}/auth0 completion bash` + (fish_completion/"auth0.fish").write `#{bin}/auth0 completion fish` + (zsh_completion/"_auth0").write `#{bin}/auth0 completion zsh` caveats: "Thanks for installing the Auth0 CLI" scoop: + name: auth0 + bucket: + owner: auth0 + name: scoop-auth0-cli + commit_author: name: auth0 - bucket: - owner: auth0 - name: scoop-auth0-cli - commit_author: - name: auth0 - email: support@auth0.com - commit_msg_template: "Scoop manifest update for {{ .ProjectName }} version {{ .Tag }}" - homepage: https://auth0.github.io/auth0-cli - description: Auth0 command-line tool to supercharge your developer workflow - license: MIT - skip_upload: auto - post_install: ["Write-Host 'Thanks for installing the Auth0 CLI'"] + email: support@auth0.com + commit_msg_template: "Scoop manifest update for {{ .ProjectName }} version {{ .Tag }}" + homepage: https://auth0.github.io/auth0-cli + description: Build, manage and test your Auth0 integrations from the command line + license: MIT + skip_upload: auto + post_install: ["Write-Host 'Thanks for installing the Auth0 CLI'"] diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..936c65761 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,97 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.0-beta.1](https://github.com/auth0/auth0-cli/tree/1.0.0-beta.1) (Jan 20, 2023) + +### Added + +- Ability to view user's assigned roles via `auth0 users roles show` [#604] +- Assign role(s) to user via `auth0 users roles assign` [#605] +- Remove user role(s) via `auth0 users roles remove` [#606] +- `perms` alias for `auth0 roles permissions` command [#534] +- Authenticating via client credentials with `auth0 login` [#546] +- Graceful access token regeneration [#547] +- Storing client secret in operating system keyring [#578] +- Supporting additional scopes through `--scopes` flag when authenticating as user [#538] +- Argument to specify log stream type for `auth0 logs streams create` and `auth0 logs streams update` [#599] +- Better guidance on authenticating in the `auth0 login` help text [#565] +- Confirmation prompts before applying editor updates [#603] + +### Changed + +- `--format json` flag/value pair consolidated to `--json` [#533] +- Flattened the `auth0 branding` commands into the root-level [#540], [#541] +- Moved `auth0 ips` command to `auth0 ap sit ips` [#618] +- Moved `auth0 users unblock` to `auth0 users blocks unblock` [#617] +- `--reveal` flag for reveal client secret renamed to `--reveal-secrets` [#591] +- Editorializing code "hints" throughout project [#570] + +### Fixed + +- "something went wrong" error during `auth0 branding texts update` [#584] +- Help text descriptions for most instances of `--number` flag [#610] +- Allow updating a non-existent email template with `auth0 email templates update` [#611] +- `--no-input` flag works for `auth0 test token` and `auth0 test login` commands [#613] +- `--no-color` flag works for all commands [#594] +- All available triggers present when running `auth0 actions create` [#597] +- Extraneous payload property when running `auth0 orgs update` [#583] +- Users search command enables pagination through `--number` flag [#588] +- Tenant commands now respect `--tenant` flag [#612] +- Log tail output now displays absolute time instead of relative [#590] +- Adding missing headers for `auth0 logs list` [#589] +- Output new action data when running `auth0 actions update` [#596] +- Log streams "no roles" errors message [#598] +- Removed erroneous `auth0 apis show --json` truncation message [#607] +- Skip interactive elements when `--json` and `--force` flags are passed [#616] + +### Removed + +- `--force` and `--json` flags relegated from global context, now applied only where appropriate [#536], [#595] +- Undocumented `auth0 config init` command [#532] +- `auth0 tenants add` command in favor of `auth0 login` [#546] +- Updating of action triggers which inevitably results in error [#597] + +[#604]: https://github.com/auth0/auth0-cli/issues/604 +[#605]: https://github.com/auth0/auth0-cli/issues/605 +[#606]: https://github.com/auth0/auth0-cli/issues/606 +[#534]: https://github.com/auth0/auth0-cli/issues/534 +[#546]: https://github.com/auth0/auth0-cli/issues/546 +[#547]: https://github.com/auth0/auth0-cli/issues/547 +[#578]: https://github.com/auth0/auth0-cli/issues/578 +[#538]: https://github.com/auth0/auth0-cli/issues/538 +[#599]: https://github.com/auth0/auth0-cli/issues/599 +[#565]: https://github.com/auth0/auth0-cli/issues/565 +[#603]: https://github.com/auth0/auth0-cli/issues/603 +[#533]: https://github.com/auth0/auth0-cli/issues/533 +[#540]: https://github.com/auth0/auth0-cli/issues/540 +[#541]: https://github.com/auth0/auth0-cli/issues/541 +[#591]: https://github.com/auth0/auth0-cli/issues/591 +[#570]: https://github.com/auth0/auth0-cli/issues/570 +[#584]: https://github.com/auth0/auth0-cli/issues/584 +[#610]: https://github.com/auth0/auth0-cli/issues/610 +[#611]: https://github.com/auth0/auth0-cli/issues/611 +[#613]: https://github.com/auth0/auth0-cli/issues/613 +[#594]: https://github.com/auth0/auth0-cli/issues/594 +[#597]: https://github.com/auth0/auth0-cli/issues/597 +[#583]: https://github.com/auth0/auth0-cli/issues/583 +[#588]: https://github.com/auth0/auth0-cli/issues/588 +[#590]: https://github.com/auth0/auth0-cli/issues/590 +[#589]: https://github.com/auth0/auth0-cli/issues/589 +[#596]: https://github.com/auth0/auth0-cli/issues/596 +[#598]: https://github.com/auth0/auth0-cli/issues/598 +[#607]: https://github.com/auth0/auth0-cli/issues/607 +[#616]: https://github.com/auth0/auth0-cli/issues/616 +[#536]: https://github.com/auth0/auth0-cli/issues/536 +[#532]: https://github.com/auth0/auth0-cli/issues/532 +[#546]: https://github.com/auth0/auth0-cli/issues/546 +[#597]: https://github.com/auth0/auth0-cli/issues/597 +[#617]: https://github.com/auth0/auth0-cli/issues/617 +[#618]: https://github.com/auth0/auth0-cli/issues/618 +[#612]: https://github.com/auth0/auth0-cli/issues/612 +[#595]: https://github.com/auth0/auth0-cli/issues/595 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9bb80cf68..f65d435fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ From the top-level directory: ``` $ make build -$ ./auth0 --help +$ ./out/auth0 --help ``` ## Adding a new command @@ -41,7 +41,7 @@ We use vendoring, so the last step is required. > This is only possible if you're a repository maintainer. -The release is driven by a Github **workflow** triggered when a new **tag** is **created**. The workflow will run the checks and trigger _Goreleaser_ to: +The release is driven by a GitHub **workflow** triggered when a new **tag** is **created**. The workflow will run the checks and trigger _Goreleaser_ to: - create the Release with the proper description (changelog) - upload the binaries for the different architectures - update https://github.com/auth0/homebrew-auth0-cli with the latest binary reference diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md new file mode 100644 index 000000000..d6c0ebc21 --- /dev/null +++ b/MIGRATION_GUIDE.md @@ -0,0 +1,153 @@ +# Migration Guide + +## Upgrading from v0.x โ†’ v1.0 + +As is to be expected with a major release, there are breaking changes in this update. Please ensure you read this guide +thoroughly and prepare your potential automated workflows before upgrading to the Auth0 CLI v1. + +### Breaking Changes + +- [Commands Reorganization](#commands-reorganization) +- [Authenticating With Client Credentials](#authenticating-with-client-credentials) +- [JSON Output Flag](#json-output-flag) +- [Reveal Client Secrets Flag](#reveal-client-secrets-flag) +- [Config Command Removal](#config-command-removal) + +#### Commands Reorganization + +Some commands have been reorganized to establish a more systematic hierarchy. +All other facets of the commands (arguments, flags, etc.) remain the same. + +| **Before (v0)** | **After (v1)** | +|----------------------------|-------------------------------------------------| +| `auth0 ips` | `auth0 protection suspicious-ip-throttling ips` | +| `auth0 users unblock` | `auth0 users blocks unblock` | +| `auth0 branding domains` | `auth0 domains` | +| `auth0 branding emails` | `auth0 email templates` | +| `auth0 branding show` | `auth0 universal-login show` | +| `auth0 branding update` | `auth0 universal-login update` | +| `auth0 branding templates` | `auth0 universal-login templates` | +| `auth0 branding texts` | `auth0 universal-login prompts` | + +#### Authenticating With Client Credentials + +The `auth0 tenants add` command which enabled authenticating to a tenant via client credentials has been consolidated +into the `auth0 login` command. It can be interfaced interactively through the terminal or non-interactively by passing +in the client credentials through the flags. + + + + + + + + + + + +
Before (v0)After (v1)
+ +```sh +# Example: +auth0 tenants add travel0.us.auth0.com \ +--client-id tUIvAH7g2ykVM4lGriYEQ6BKV3je24Ka \ +--client-secret XXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` + + +```sh +# Example: +auth0 login --domain travel0.us.auth0.com \ +--client-id tUIvAH7g2ykVM4lGriYEQ6BKV3je24Ka \ +--client-secret XXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` +
+ +#### JSON Output Flag + +The `--format json` flag-value pair has been condensed into the `--json` flag. + +| **Before (v0)** | **After (v1)** | +|---------------------------------|--------------------------| +| `auth0 apps list --format json` | `auth0 apps list --json` | + +#### Log Streams + +In `v0.x`, the creation and updating of log streams through the `auth0 logs streams create` and +`auth0 log streams update` commands facilitated the management of all log stream types with a mass of +type-specific flags. For `v1.x`, the type of log stream is now required as an argument. +This change facilitates more ergonomic flags and type-specific validations. + + + + + + + + + + +
Before (v0)After (v1)
+ +```sh +# Example: +auth0 logs streams create \ +--type datadog \ +--name "My Datadog Log Stream" \ +--datadog-id us \ +--datadog-key 3c0c4965368b6b10f8640dbda46abfdc +``` + + +```sh +# Example: +auth0 logs streams create datadog \ +--name "My Datadog Log Stream" \ +--region us \ +--api-key 3c0c4965368b6b10f8640dbda46abfdc +``` +
+ +#### Reveal Client Secrets Flag + +In `v0.x`, the `auth0 apps create` command has a `--reveal` flag that would reveal the client secrets in the output. +This flag has changed to `--reveal-secrets` to clarify what is being revealed. + +| **Before (v0)** | **After (v1)** | +|------------------------------|--------------------------------------| +| `auth0 apps create --reveal` | `auth0 apps create --reveal-secrets` | + + +#### Config Command Removal + +In `v0.x`, the undocumented `auth0 config init` command existed to authenticate with a tenant for E2E testing. +It authenticated with tenants via client credentials which were sourced from environment variables. +This command has been removed in favor of the `auth0 login` command. + + + + + + + + + + +
Before (v0)After (v1)
+ +```sh +# Example: +AUTH0_CLI_CLIENT_DOMAIN="travel0.us.auth0.com" \ +AUTH0_CLI_CLIENT_ID="tUIvPH7g2ykVm4lGriYEQ6BKV3je24Ka" \ +AUTH0_CLI_CLIENT_SECRET="XXXXXXXXXXXXXXXXXXXXXXXXXXXX" \ +auth0 config init +``` + + +```sh +# Example: +auth0 login --domain travel0.us.auth0.com \ +--client-id tUIvPH7g2ykVm4lGriYEQ6BKV3je24Ka \ +--client-secret XXXXXXXXXXXXXXXXXXXXXXXXXXXX +``` +
diff --git a/Makefile b/Makefile index 3d37aa7cb..456f3aa2a 100644 --- a/Makefile +++ b/Makefile @@ -71,18 +71,17 @@ $(GO_BIN)/auth0: #----------------------------------------------------------------------------------------------------------------------- # Documentation #----------------------------------------------------------------------------------------------------------------------- -.PHONY: docs-build docs-start docs-clean +.PHONY: docs docs-start docs-clean -docs-build: docs-clean ## Build the documentation - @go run ./cmd/build_doc +docs: docs-clean ## Build the documentation + @go run ./cmd/doc-gen @mv ./docs/auth0.md ./docs/index.md - @cd docs && bundle install docs-start: ## Start the doc site locally for testing purposes - @cd docs && bundle exec jekyll serve + @cd docs && bundle install && bundle exec jekyll serve docs-clean: ## Remove the documentation - @rm ./docs/auth0_*.md + @rm -f ./docs/auth0_*.md #----------------------------------------------------------------------------------------------------------------------- # Building & Installing @@ -115,6 +114,18 @@ check-vuln: $(GO_BIN)/govulncheck ## Check go vulnerabilities ${call print, "Running govulncheck over project"} @govulncheck -v ./... +check-docs: ## Check that documentation was generated correctly + ${call print, "Checking that documentation was generated correctly"} + @$(MAKE) docs + @if [ -n "$$(git status --porcelain)" ]; \ + then \ + echo "Rebuilding the documentation resulted in changed files:"; \ + echo "$$(git diff)"; \ + echo "Please run \`make docs\` to regenerate docs."; \ + exit 1; \ + fi + @echo "Documentation is generated correctly." + #----------------------------------------------------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------------------------------------------------- @@ -129,10 +140,7 @@ test-unit: ## Run unit tests test-integration: $(GO_BIN)/commander ## Run integration tests. To run a specific test pass the FILTER var. Usage: `make test-integration FILTER="attack protection"` ${call print, "Running integration tests"} @$(MAKE) install # ensure fresh install prior to running test - auth0 config init && commander test ./test/integration/test-cases.yaml --filter "$(FILTER)"; \ - exit_code=$$?; \ - bash ./test/integration/scripts/test-cleanup.sh; \ - exit $$exit_code + @bash ./test/integration/scripts/run-test-suites.sh test-mocks: $(GO_BIN)/mockgen ## Generate testing mocks using mockgen ${call print, "Generating test mocks"} diff --git a/README.md b/README.md index b0202ab5e..cdacf51db 100644 --- a/README.md +++ b/README.md @@ -1,279 +1,172 @@ -# Auth0 CLI (Experimental) +
+

Auth0 CLI

-`auth0` is the command line to supercharge your development workflow. +[![GoDoc](https://pkg.go.dev/badge/github.com/auth0/auth0-cli.svg)](https://pkg.go.dev/github.com/auth0/auth0-cli) +[![Go Report Card](https://goreportcard.com/badge/github.com/auth0/auth0-cli?style=flat-square)](https://goreportcard.com/report/github.com/auth0/auth0-cli) +[![Release](https://img.shields.io/github/v/release/auth0/auth0-cli?logo=auth0&include_prereleases&style=flat-square)](https://github.com/auth0/auth0-cli/releases) +[![License](https://img.shields.io/github/license/auth0/auth0-cli.svg?logo=fossa&style=flat-square)](https://github.com/auth0/auth0-cli/blob/main/LICENSE) +[![Build Status](https://img.shields.io/github/actions/workflow/status/auth0/auth0-cli/go.yml?branch=main)](https://github.com/auth0/auth0-cli/actions?query=branch%3Amain) -> Note: This CLI is an experimental release, and is built on a best-efforts basis by some Auth0 developers in their available innovation time. It is open-source licensed and free to use, and is not covered by any Auth0 Terms of Service or Agreements. If you have issues with this CLI you can engage with the project's developer community through the repository GitHub Issues list, or contribute fixes and enhancements of your own via a Pull Request. +
-Build, test, troubleshoot and manage your integration with **[Auth0](http://auth0.com/)** directly from your **terminal**. +--- + +Build, manage and test your [Auth0](https://auth0.com/) integrations from the command line. ![demo](./demo.gif) ---- +## ๐ŸŽข Highlights -## Table of Contents +- **๐Ÿงช Test your universal login flow:** Emulate your end users' login experience by running `auth0 test login`. +- **๐Ÿ” Troubleshoot in real-time:** Inspect the events of your Auth0 integration as they happen with the `auth0 logs tail` command. +- **๐Ÿ” Simplify repetitive tasks:** Create, update, list and delete your Auth0 resources directly from the terminal. + +## ๐Ÿ“œ Table of Contents -- [Features](#features) - [Installation](#installation) -- [Usage](#usage) +- [Authenticating to Your Tenant](#authenticating-to-your-tenant) +- [Available Commands](#available-commands) - [Customization](#customization) - [Anonymous Analytics](#anonymous-analytics) -- [Contributing](#contributing) -- [Author](#author) - ---- - -## Features - -### ๐Ÿงช Test the login flow at any time - -You can easily test out the Universal Login box of your Auth0 application by running `auth0 test login`. This initiates a login flow in your browser. Once you complete the process, the Auth0 CLI will display your profile information and credentials. - -### โšก๏ธ Get up and running quickly -You can also download a QuickStart sample application thatโ€™s already configured for your Auth0 application with `auth0 quickstarts download`. Just install the dependencies, and the sample application will be ready to run. Use it as an example integration to help set up Auth0 in your own application. - -### ๐Ÿ” Find issues faster - -If you encounter difficulties setting up your integration, use the Auth0 CLI to tail your tenantโ€™s logs for a smoother troubleshooting experience. `auth0 logs tail` will let you inspect the authentication events as they happen. You can easily filter the events from a single Auth0 application with `--filter "client_id:"` and use `--debug` to get the raw error details. - -### ๐Ÿ” Simplify repetitive tasks - -With the Auth0 CLI, you can: - -- Manage your Auth0 applications, rules, and APIs right from the terminal. -- Create, update, and delete resources interactively. -- List all your resources or inspect them individually. - -## Installation +## ๐Ÿช› Installation ### macOS -#### [Homebrew](https://brew.sh/) +Install via [Homebrew](https://brew.sh/): ```bash - brew tap auth0/auth0-cli && brew install auth0 +brew tap auth0/auth0-cli && brew install auth0 ``` -#### Manually - -1. Download the _Darwin_ binary from the latest release: https://github.com/auth0/auth0-cli/releases/latest/ -1. Extract -1. Run `./auth0` -1. Setup CLI commands completion for your terminal: - - (**bash**) `auth0 completion bash > /usr/local/etc/bash_completion.d/auth0` - - (**zsh**) `auth0 completion zsh > "${fpath[1]}/_auth0"` - - (**fish**) `auth0 completion fish | source` - -> see more completion options: `auth0 completion -h` - ### Windows -#### [Scoop](https://scoop.sh/) +Install via [Scoop](https://scoop.sh/): ```bash scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git scoop install auth0 ``` -#### Manually +### Linux -1. Download the _Windows_ binary from the latest release: https://github.com/auth0/auth0-cli/releases/latest/ -1. Extract -1. Run `auth0.exe` +Install via [cURL](https://curl.se/): -### Linux +```bash +# Binary will be downloaded to "./auth0". +curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b . + +# To be able to run the binary from any directory +# make sure you move it to a place in your $PATH +# sudo mv ./auth0 /usr/local/bin +``` -#### [Homebrew](https://brew.sh/) +### Go + +Install via [Go](https://go.dev/): ```bash - brew tap auth0/auth0-cli && brew install auth0 +# Make sure your $GOPATH/bin is exported on your $PATH +# to be able to run the binary from any directory. +go install github.com/auth0/auth0-cli/cmd/auth0@latest ``` -#### Manually +### Manual -1. Download the _Linux_ binary from the latest release: https://github.com/auth0/auth0-cli/releases/latest/ -1. Extract `$ tar -xf auth0-cli_{dowloaded version here}_Linux_x86_64.tar.gz` -1. Run `./auth0` -1. Setup CLI commands completion for your terminal: - `sudo ./auth0 completion bash > /etc/bash_completion.d/auth0` - > see more completion options: `auth0 completion -h` +1. Download the appropriate binary for your environment from the [latest release](https://github.com/auth0/auth0-cli/releases/latest/) +2. Extract the archive + - **macOS**: `$ tar -xf auth0-cli_{version}_Darwin_{architecture}.tar.gz` + - **Linux**: `$ tar -xf auth0-cli_{version}_Linux_{architecture}.tar.gz` + - **Windows**: Extract `auth0-cli_{version}_Windows_{architecture}.zip` using your preferred method of choice +3. Run `./auth0` -## Usage +> **Note** +> Autocompletion instructions for supported platforms available by running `auth0 completion -h` -After installation, you should have the `auth0` command available: +## ๐Ÿ” Authenticating to Your Tenant -```bash -auth0 [command] +Authenticating to your Auth0 tenant is required for most functions of the CLI. It can be initiated by running: -# For any help, run --help after a specific command, e.g.: -auth0 [command] --help +```bash +auth0 login ``` +There are two ways to authenticate: + +- **As a user** - Recommended when invoking on a personal machine or other interactive environment. Facilitated by [device authorization](https://auth0.com/docs/get-started/authentication-and-authorization-flow/device-authorization-flow) flow. +- **As a machine** - Recommended when running on a server or non-interactive environments (ex: CI). Facilitated by [client credentials](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow) flow. Flags available for bypassing interactive shell. + +> **Warning** +> Authenticating as a user is not supported for **private cloud** tenants. Instead, those users should authenticate with client credentials. + +## ๐Ÿ’ป Available Commands + - [auth0 actions](https://auth0.github.io/auth0-cli/auth0_actions.html) - Manage resources for actions +- [auth0 api](https://auth0.github.io/auth0-cli/auth0_api.html) - Makes an authenticated HTTP request to the Auth0 Management API - [auth0 apis](https://auth0.github.io/auth0-cli/auth0_apis.html) - Manage resources for APIs - [auth0 apps](https://auth0.github.io/auth0-cli/auth0_apps.html) - Manage resources for applications -- [auth0 attack-protection](https://auth0.github.io/auth0-cli/auth0_attack_protection.html) - Manage attack protection settings -- [auth0 branding](https://auth0.github.io/auth0-cli/auth0_branding.html) - Manage branding options - [auth0 completion](https://auth0.github.io/auth0-cli/auth0_completion.html) - Setup autocomplete features for this CLI on your terminal -- [auth0 ips](https://auth0.github.io/auth0-cli/auth0_ips.html) - Manage blocked IP addresses +- [auth0 domains](https://auth0.github.io/auth0-cli/auth0_domains.html) - Manage custom domains +- [auth0 email](https://auth0.github.io/auth0-cli/auth0_email.html) - Manage email settings - [auth0 login](https://auth0.github.io/auth0-cli/auth0_login.html) - Authenticate the Auth0 CLI - [auth0 logout](https://auth0.github.io/auth0-cli/auth0_logout.html) - Log out of a tenant's session - [auth0 logs](https://auth0.github.io/auth0-cli/auth0_logs.html) - View tenant logs - [auth0 orgs](https://auth0.github.io/auth0-cli/auth0_orgs.html) - Manage resources for organizations +- [auth0 protection](https://auth0.github.io/auth0-cli/auth0_protection.html) - Manage resources for attack protection - [auth0 quickstarts](https://auth0.github.io/auth0-cli/auth0_quickstarts.html) - Quickstart support for getting bootstrapped - [auth0 roles](https://auth0.github.io/auth0-cli/auth0_roles.html) - Manage resources for roles - [auth0 rules](https://auth0.github.io/auth0-cli/auth0_rules.html) - Manage resources for rules - [auth0 tenants](https://auth0.github.io/auth0-cli/auth0_tenants.html) - Manage configured tenants - [auth0 test](https://auth0.github.io/auth0-cli/auth0_test.html) - Try your Universal Login box or get a token +- [auth0 universal-login](https://auth0.github.io/auth0-cli/auth0_universal-login.html) - Manage the Universal Login experience - [auth0 users](https://auth0.github.io/auth0-cli/auth0_users.html) - Manage resources for users -### Onboarding Journey - -Following these instructions will give you a sense of what's possible with the -Auth0 CLI. To start, you will have to log in: - -#### Login - -To log in, run: - -```bash -auth0 login -``` - -> **Warning** -> Authenticating as a user via `auth0 login` is not supported for **private cloud** tenants. Instead, those users should authenticate with client credentials via `auth0 tenants add`. - -#### Creating your application - -If you haven't created an application yet, you may do so by running the -following command: - -```bash -auth0 apps create -``` +## ๐Ÿ–Œ๏ธ Customization -A screen similar to the following will be presented after successful app creation: - -```bash -$ auth0 apps create - Name: My Awesome App - Description: Test app - Type: Regular Web Application - Callback URLs: http://localhost:3000 - Allowed Logout URLs: http://localhost:3000 - -=== travel0.auth0.com application created - - CLIENT ID wmVzrZkGhKgglMRMvpauORCulBkQ5qeI - NAME My Awesome App - DESCRIPTION Test app - TYPE regular web application - CLIENT SECRET kaS2NR5nk2PcGuITQ8JoKnpVnc5ky1TuKgsb6iTA08ec8XqizqkDupKhEIcsFiNM - CALLBACKS http://localhost:3000 - ALLOWED LOGOUT URLS http://localhost:3000 - ALLOWED ORIGINS - ALLOWED WEB ORIGINS - TOKEN ENDPOINT AUTH - GRANTS implicit, authorization_code, refresh_token, client_credentials - - โ–ธ Quickstarts: https://auth0.com/docs/quickstart/webapp - โ–ธ Hint: Test this app's login box with 'auth0 test login wmVzrZkGhKgglMRMvpauORCulBkQ5qeI' - โ–ธ Hint: You might wanna try 'auth0 quickstarts download wmVzrZkGhKgglMRMvpauORCulBkQ5qeI' -``` - -As you might observe, the next thing to do would likely be to try logging in -using the client ID. - -#### Testing the login flow - -Whether or not you've created the application using the CLI or the management -dashboard, you'll be able to test logging in using a specific application. - -If you have the client ID, you may pass it as an argument, -otherwise a prompt will be presented: - -```bash -auth0 test login -``` - -#### Tailing your logs - -Once you have a few logins in place, you might wanna tail your logs. This is -done by running the following command: - -```bash -auth0 logs tail -``` - -After running that, one might see the following output: - -``` -Success Login 9 minutes ago Username-Password-Authentic... my awesome app -``` - -If there are errors encountered, such as the following example, you may run it -with the `--debug` flag as follows: +To change the text editor used for editing templates, rules, and actions, +set the environment variable `EDITOR` to your preferred editor. Example: -```bash -auth0 logs tail --debug +```shell +export EDITOR="code -w" +# or +export EDITOR="nano" ``` -The full raw data will be displayed below every error: +## ๐Ÿ“Š Anonymized Analytics Disclosure -``` -Failed Login hello 7 minutes ago N/A my awesome app - - id: "90020210306002808976000921438552554184272624146777636962" - logid: "90020210306002808976000921438552554184272624146777636962" - date: 2021-03-06T00:28:04.91Z - type: f - clientid: vXAtoaFdhlmtWjpIrjb9AUnrGEAOH2MM - clientname: my awesome app - ip: 1.2.3.4 - description: hello - locationinfo: {} - details: - body: - action: default - password: '*****' - state: QXV0aDAgaXMgaGlyaW5nISBhdXRoMC5jb20vY2FyZWVycyAK - username: j.doe@gmail.com - connection: Username-Password-Authentication - error: - message: hello - oauthError: access_denied - type: oauth-authorization - qs: {} - session_id: QXV0aDAgaXMgaGlyaW5nISBhdXRoMC5jb20vY2FyZWVycyAK - userid: auth0|QXV0aDAgaXMgaGlyaW5nISBhdXRoMC5jb20vY2FyZWVycyAK -``` - -## Customization +Anonymized data points are collected during the use of this CLI. This data includes the CLI version, operating system, timestamp, and other technical details that do not personally identify you. -To change the text editor used for editing templates, rules, and actions, -set the environment variable `EDITOR` to your preferred editor: +Auth0 uses this data to better understand the usage of this tool to prioritize the features, enhancements and fixes that matter most to our users. -`export EDITOR="code -w"` +To **opt-out** of this collection, set the `AUTH0_CLI_ANALYTICS` environment variable to `false`. -`export EDITOR="nano"` +## ๐Ÿ™‡ Feedback -## Anonymous Analytics +### Contributing -By default, the CLI tracks some anonymous usage events. This helps us understand how the CLI is being used, so we can continue to improve it. You can opt-out by setting the environment variable `AUTH0_CLI_ANALYTICS` to `false`. +We appreciate feedback and contribution to this repo! Before you get started, please see the following: -### Data sent +- [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) +- [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) +- [This repo's contribution guide](https://github.com/auth0/auth0-cli/blob/main/CONTRIBUTING.md) -Every event tracked sends the following data along with the event name: +### Raise an issue -- The CLI version. -- The OS name: as determined by the value of `GOOS`, e.g. `windows`. -- The processor architecture: as determined by the value of `GOARCH`, e.g. `amd64`. -- The install ID: an anonymous UUID that is stored in the CLI's config file. -- A timestamp. +To provide feedback or report a bug, please [raise an issue on our issue tracker](https://github.com/auth0/auth0-cli/issues). -## Contributing +### Vulnerability Reporting -Please check the [contributing guidelines](CONTRIBUTING.md). +Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues. -## Author +--- -[Auth0](https://auth0.com) +

+ + + + Auth0 Logo + +

+

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

+

+This project is licensed under the MIT license. See the LICENSE file for more info.

diff --git a/cmd/build_doc/main.go b/cmd/doc-gen/main.go similarity index 56% rename from cmd/build_doc/main.go rename to cmd/doc-gen/main.go index 564ecb716..60e6fa778 100644 --- a/cmd/build_doc/main.go +++ b/cmd/doc-gen/main.go @@ -1,12 +1,13 @@ package main import ( + "log" + "github.com/auth0/auth0-cli/internal/cli" ) func main() { - err := cli.BuildDoc() - if err != nil { - panic(err) + if err := cli.GenerateDocs(); err != nil { + log.Fatal(err) } } diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 60a408a27..1d26fbb1b 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -274,4 +274,4 @@ DEPENDENCIES webrick (~> 1.7) BUNDLED WITH - 2.1.4 + 2.3.26 diff --git a/docs/_config.yml b/docs/_config.yml index 2a057ad1c..d988f7749 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -3,15 +3,15 @@ title: Auth0 CLI description: >- - auth0 is the command line to supercharge your development workflow. + Build, manage and test your Auth0 integrations from the command line. baseurl: "/auth0-cli" url: "" # the base hostname & protocol for your site, e.g. http://example.com twitter_username: auth0 -github_username: auth0 +github_username: auth0 +github_repo: auth0-cli # Build settings theme: minima header_pages: - - about.markdown - + - diff --git a/docs/_includes/social.html b/docs/_includes/social.html index 44046b866..a6b04b34c 100644 --- a/docs/_includes/social.html +++ b/docs/_includes/social.html @@ -2,7 +2,7 @@ {%- if site.dribbble_username -%}
  • {{ site.dribbble_username| escape }}
  • {%- endif -%} {%- if site.facebook_username -%}
  • {{ site.facebook_username| escape }}
  • {%- endif -%} {%- if site.flickr_username -%}
  • {{ site.flickr_username| escape }}
  • {%- endif -%} - {%- if site.github_username -%}
  • {{ site.github_username| escape }}
  • {%- endif -%} + {%- if site.github_username -%}
  • {{ site.github_username| escape }}
  • {%- endif -%} {%- if site.instagram_username -%}
  • {{ site.instagram_username| escape }}
  • {%- endif -%} {%- if site.linkedin_username -%}
  • {{ site.linkedin_username| escape }}
  • {%- endif -%} {%- if site.pinterest_username -%}
  • {{ site.pinterest_username| escape }}
  • {%- endif -%} diff --git a/docs/about.markdown b/docs/about.markdown deleted file mode 100644 index 0e92e45f0..000000000 --- a/docs/about.markdown +++ /dev/null @@ -1,7 +0,0 @@ ---- -layout: page -title: About -permalink: /about/ ---- - -Build, test, troubleshoot and manage your integration with [Auth0](http://auth0.com/) directly from your terminal. diff --git a/docs/auth0_actions.md b/docs/auth0_actions.md index 34a0f10f8..79454bce5 100644 --- a/docs/auth0_actions.md +++ b/docs/auth0_actions.md @@ -1,39 +1,17 @@ --- layout: default --- -## auth0 actions +# auth0 actions -Manage resources for actions +Actions are secure, tenant-specific, versioned functions written in Node.js that execute at certain points within the Auth0 platform. Actions are used to customize and extend Auth0's capabilities with custom logic. -### Synopsis +## Commands -Manage resources for actions. - -### Options - -``` - -h, --help help for actions -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0](/auth0-cli/) - Supercharge your development workflow. -* [auth0 actions create](auth0_actions_create.md) - Create a new action -* [auth0 actions delete](auth0_actions_delete.md) - Delete an action -* [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action -* [auth0 actions list](auth0_actions_list.md) - List your actions -* [auth0 actions open](auth0_actions_open.md) - Open action details page in the Auth0 Dashboard -* [auth0 actions show](auth0_actions_show.md) - Show an action -* [auth0 actions update](auth0_actions_update.md) - Update an action +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action diff --git a/docs/auth0_actions_create.md b/docs/auth0_actions_create.md index 9180ad544..34dfe4689 100644 --- a/docs/auth0_actions_create.md +++ b/docs/auth0_actions_create.md @@ -1,51 +1,63 @@ --- layout: default --- -## auth0 actions create +# auth0 actions create -Create a new action +Create a new action. -### Synopsis +To create interactively, use `auth0 actions create` with no flags. -Create a new action. +To create non-interactively, supply the action name, trigger, code, secrets and dependencies through the flags. +## Usage ``` auth0 actions create [flags] ``` -### Examples +## Examples ``` -auth0 actions create -auth0 actions create --name myaction -auth0 actions create -n myaction --trigger post-login -auth0 actions create -n myaction -t post-login -d "lodash=4.0.0" -d "uuid=8.0.0" -auth0 actions create -n myaction -t post-login -d "lodash=4.0.0" -s "API_KEY=value" -s "SECRET=value + auth0 actions create + auth0 actions create --name myaction + auth0 actions create --name myaction --trigger post-login + auth0 actions create --name myaction --trigger post-login --code "$(cat path/to/code.js)" + auth0 actions create --name myaction --trigger post-login --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" + auth0 actions create --name myaction --trigger post-login --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --secret "SECRET=value" + auth0 actions create --name myaction --trigger post-login --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --dependency "uuid=9.0.0" --secret "API_KEY=value" --secret "SECRET=value" + auth0 actions create -n myaction -t post-login -c "$(cat path/to/code.js)" -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json ``` -### Options + +## Flags ``` -c, --code string Code content for the action. - -d, --dependency stringToString Third party npm module, and it version, that the action depends on. (default []) - -h, --help help for create + -d, --dependency stringToString Third party npm module, and its version, that the action depends on. (default []) + --json Output in json format. -n, --name string Name of the action. - -s, --secret stringToString Secret to be used in the action. (default []) + -s, --secret stringToString Secrets to be used in the action. (default []) -t, --trigger string Trigger of the action. At this time, an action can only target a single trigger at a time. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 actions](auth0_actions.md) - Manage resources for actions +## Related Commands + +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action + diff --git a/docs/auth0_actions_delete.md b/docs/auth0_actions_delete.md index 6c457f118..38e5c2306 100644 --- a/docs/auth0_actions_delete.md +++ b/docs/auth0_actions_delete.md @@ -1,43 +1,54 @@ --- layout: default --- -## auth0 actions delete +# auth0 actions delete -Delete an action +Delete an action. -### Synopsis +To delete interactively, use `auth0 actions delete` with no arguments. -Delete an action. +To delete non-interactively, supply the action id and the `--force` flag to skip confirmation. +## Usage ``` auth0 actions delete [flags] ``` -### Examples +## Examples ``` -auth0 actions delete -auth0 actions delete + auth0 actions delete + auth0 actions rm + auth0 actions delete + auth0 actions delete --force ``` -### Options + +## Flags ``` - -h, --help help for delete + --force Skip confirmation. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 actions](auth0_actions.md) - Manage resources for actions +## Related Commands + +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action + diff --git a/docs/auth0_actions_deploy.md b/docs/auth0_actions_deploy.md index 1267ecd4f..9da3684be 100644 --- a/docs/auth0_actions_deploy.md +++ b/docs/auth0_actions_deploy.md @@ -1,43 +1,51 @@ --- layout: default --- -## auth0 actions deploy +# auth0 actions deploy -Deploy an action +Before an action can be bound to a flow, the action must be deployed. -### Synopsis - -Deploy an action. +The selected action will be deployed and added to the collection of available actions for flows. Additionally, a new draft version of the deployed action will be created for future editing. Because secrets and dependencies are tied to versions, any saved secrets or dependencies will be available to the new draft. +## Usage ``` auth0 actions deploy [flags] ``` -### Examples +## Examples ``` -auth0 actions deploy -auth0 actions deploy + auth0 actions deploy + auth0 actions deploy + auth0 actions deploy --json ``` -### Options + +## Flags ``` - -h, --help help for deploy + --json Output in json format. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 actions](auth0_actions.md) - Manage resources for actions +## Related Commands + +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action + diff --git a/docs/auth0_actions_list.md b/docs/auth0_actions_list.md index f68e302ea..005a37cb6 100644 --- a/docs/auth0_actions_list.md +++ b/docs/auth0_actions_list.md @@ -1,44 +1,49 @@ --- layout: default --- -## auth0 actions list +# auth0 actions list -List your actions - -### Synopsis - -List your existing actions. To create one try: -auth0 actions create +List your existing actions. To create one, run: `auth0 actions create`. +## Usage ``` auth0 actions list [flags] ``` -### Examples +## Examples ``` -auth0 actions list -auth0 actions ls + auth0 actions list + auth0 actions ls + auth0 actions ls --json ``` -### Options + +## Flags ``` - -h, --help help for list + --json Output in json format. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 actions](auth0_actions.md) - Manage resources for actions +## Related Commands + +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action + diff --git a/docs/auth0_actions_open.md b/docs/auth0_actions_open.md index 99e152367..2fff02143 100644 --- a/docs/auth0_actions_open.md +++ b/docs/auth0_actions_open.md @@ -1,42 +1,43 @@ --- layout: default --- -## auth0 actions open +# auth0 actions open -Open action details page in the Auth0 Dashboard - -### Synopsis - -Open action details page in the Auth0 Dashboard. +Open an action's settings page in the Auth0 Dashboard. +## Usage ``` auth0 actions open [flags] ``` -### Examples +## Examples ``` -auth0 actions open + auth0 actions open + auth0 actions open ``` -### Options -``` - -h, --help help for open -``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 actions](auth0_actions.md) - Manage resources for actions +## Related Commands + +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action + diff --git a/docs/auth0_actions_show.md b/docs/auth0_actions_show.md index 790b9bb07..5919f4b7a 100644 --- a/docs/auth0_actions_show.md +++ b/docs/auth0_actions_show.md @@ -1,43 +1,49 @@ --- layout: default --- -## auth0 actions show +# auth0 actions show -Show an action - -### Synopsis - -Show an action. +Display the name, type, status, code and other information about an action. +## Usage ``` auth0 actions show [flags] ``` -### Examples +## Examples ``` -auth0 actions show -auth0 actions show + auth0 actions show + auth0 actions show + auth0 actions show --json ``` -### Options + +## Flags ``` - -h, --help help for show + --json Output in json format. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 actions](auth0_actions.md) - Manage resources for actions +## Related Commands + +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action + diff --git a/docs/auth0_actions_update.md b/docs/auth0_actions_update.md index 4c4a61789..767162b5c 100644 --- a/docs/auth0_actions_update.md +++ b/docs/auth0_actions_update.md @@ -1,51 +1,62 @@ --- layout: default --- -## auth0 actions update +# auth0 actions update -Update an action +Update an action. -### Synopsis +To update interactively, use `auth0 actions update` with no arguments. -Update an action. +To update non-interactively, supply the action id, name, code, secrets and dependencies through the flags. +## Usage ``` auth0 actions update [flags] ``` -### Examples +## Examples ``` -auth0 actions update -auth0 actions update --name myaction -auth0 actions update -n myaction --trigger post-login -auth0 actions update -n myaction -t post-login -d "lodash=4.0.0" -d "uuid=8.0.0" -auth0 actions update -n myaction -t post-login -d "lodash=4.0.0" -s "API_KEY=value" -s "SECRET=value + auth0 actions update + auth0 actions update --name myaction + auth0 actions update --name myaction --code "$(cat path/to/code.js)" + auth0 actions update --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" + auth0 actions update --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --secret "SECRET=value" + auth0 actions update --name myaction --code "$(cat path/to/code.js)" --dependency "lodash=4.0.0" --dependency "uuid=9.0.0" --secret "API_KEY=value" --secret "SECRET=value" + auth0 actions update -n myaction -t post-login -c "$(cat path/to/code.js)" -d "lodash=4.0.0" -d "uuid=9.0.0" -s "API_KEY=value" -s "SECRET=value" --json ``` -### Options + +## Flags ``` -c, --code string Code content for the action. - -d, --dependency stringToString Third party npm module, and it version, that the action depends on. (default []) - -h, --help help for update + -d, --dependency stringToString Third party npm module, and its version, that the action depends on. (default []) + --force Skip confirmation. + --json Output in json format. -n, --name string Name of the action. - -s, --secret stringToString Secret to be used in the action. (default []) - -t, --trigger string Trigger of the action. At this time, an action can only target a single trigger at a time. + -s, --secret stringToString Secrets to be used in the action. (default []) ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 actions](auth0_actions.md) - Manage resources for actions +## Related Commands + +- [auth0 actions create](auth0_actions_create.md) - Create a new action +- [auth0 actions delete](auth0_actions_delete.md) - Delete an action +- [auth0 actions deploy](auth0_actions_deploy.md) - Deploy an action +- [auth0 actions list](auth0_actions_list.md) - List your actions +- [auth0 actions open](auth0_actions_open.md) - Open the settings page of an action +- [auth0 actions show](auth0_actions_show.md) - Show an action +- [auth0 actions update](auth0_actions_update.md) - Update an action + diff --git a/docs/auth0_api.md b/docs/auth0_api.md index 719abafec..5e66a0c6e 100644 --- a/docs/auth0_api.md +++ b/docs/auth0_api.md @@ -1,55 +1,46 @@ --- layout: default --- -## auth0 api +# auth0 api -Makes an authenticated HTTP request to the Auth0 Management API +Makes an authenticated HTTP request to the [Auth0 Management API](https://auth0.com/docs/api/management/v2) and returns the response as JSON. -### Synopsis +Method argument is optional, defaults to `GET` for requests without data and `POST` for requests with data. -Makes an authenticated HTTP request to the Auth0 Management API and prints the response as JSON. - -The method argument is optional, and when you donโ€™t specify it, the command defaults to GET for requests without data and POST for requests with data. - -Auth0 Management API Docs: - https://auth0.com/docs/api/management/v2 - -Available Methods: - get, post, put, patch, delete +Additional scopes may need to be requested during authentication step via the `--scopes` flag. For example: `auth0 login --scopes read:client_grants`. +## Usage ``` auth0 api [flags] ``` -### Examples +## Examples ``` -auth0 api "stats/daily" -q "from=20221101" -q "to=20221118" -auth0 api get "tenants/settings" -auth0 api clients --data "{\"name\":\"ssoTest\",\"app_type\":\"sso_integration\"}" -cat data.json | auth0 api post clients + auth0 api get "tenants/settings" + auth0 api "stats/daily" -q "from=20221101" -q "to=20221118" + auth0 api delete "actions/actions/" --force + auth0 api clients --data "{\"name\":\"ssoTest\",\"app_type\":\"sso_integration\"}" + cat data.json | auth0 api post clients ``` -### Options + +## Flags ``` -d, --data string JSON data payload to send with the request. Data can be piped in as well instead of using this flag. - -h, --help help for api + --force Skip confirmation when using the delete method. -q, --query stringToString Query params to send with the request. (default []) ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO - -* [auth0](/auth0-cli/) - Supercharge your development workflow. diff --git a/docs/auth0_apis.md b/docs/auth0_apis.md index 195b4f598..b2556a393 100644 --- a/docs/auth0_apis.md +++ b/docs/auth0_apis.md @@ -1,39 +1,17 @@ --- layout: default --- -## auth0 apis +# auth0 apis -Manage resources for APIs +Manage resources for APIs. An API is an entity that represents an external resource, capable of accepting and responding to protected resource requests made by applications. In the OAuth2 specification, an API maps to the Resource Server. -### Synopsis +## Commands -Manage resources for APIs. - -### Options - -``` - -h, --help help for apis -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0](/auth0-cli/) - Supercharge your development workflow. -* [auth0 apis create](auth0_apis_create.md) - Create a new API -* [auth0 apis delete](auth0_apis_delete.md) - Delete an API -* [auth0 apis list](auth0_apis_list.md) - List your APIs -* [auth0 apis open](auth0_apis_open.md) - Open API settings page in the Auth0 Dashboard -* [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes -* [auth0 apis show](auth0_apis_show.md) - Show an API -* [auth0 apis update](auth0_apis_update.md) - Update an API +- [auth0 apis create](auth0_apis_create.md) - Create a new API +- [auth0 apis delete](auth0_apis_delete.md) - Delete an API +- [auth0 apis list](auth0_apis_list.md) - List your APIs +- [auth0 apis open](auth0_apis_open.md) - Open the settings page of an API +- [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +- [auth0 apis show](auth0_apis_show.md) - Show an API +- [auth0 apis update](auth0_apis_update.md) - Update an API diff --git a/docs/auth0_apis_create.md b/docs/auth0_apis_create.md index 9c70825e2..3ad8f7818 100644 --- a/docs/auth0_apis_create.md +++ b/docs/auth0_apis_create.md @@ -1,51 +1,62 @@ --- layout: default --- -## auth0 apis create +# auth0 apis create -Create a new API +Create a new API. -### Synopsis +To create interactively, use `auth0 apis create` with no flags. -Create a new API. +To create non-interactively, supply the name, identifier, scopes, token lifetime and whether to allow offline access through the flags. +## Usage ``` auth0 apis create [flags] ``` -### Examples +## Examples ``` -auth0 apis create -auth0 apis create --name myapi -auth0 apis create -n myapi --identifier http://my-api -auth0 apis create -n myapi --token-expiration 6100 -auth0 apis create -n myapi -e 6100 --offline-access=true + auth0 apis create + auth0 apis create --name myapi + auth0 apis create --name myapi --identifier http://my-api + auth0 apis create --name myapi --identifier http://my-api --token-lifetime 6100 + auth0 apis create --name myapi --identifier http://my-api --token-lifetime 6100 --offline-access + auth0 apis create --name myapi --identifier http://my-api --token-lifetime 6100 --offline-access false --scopes "letter:write,letter:read" + auth0 apis create -n myapi -i http://my-api -t 6100 -o false -s "letter:write,letter:read" --json ``` -### Options + +## Flags ``` - -h, --help help for create -i, --identifier string Identifier of the API. Cannot be changed once set. + --json Output in json format. -n, --name string Name of the API. -o, --offline-access Whether Refresh Tokens can be issued for this API (true) or not (false). -s, --scopes strings Comma-separated list of scopes (permissions). -l, --token-lifetime int The amount of time in seconds that the token will be valid after being issued. Default value is 86400 seconds (1 day). ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apis](auth0_apis.md) - Manage resources for APIs +## Related Commands + +- [auth0 apis create](auth0_apis_create.md) - Create a new API +- [auth0 apis delete](auth0_apis_delete.md) - Delete an API +- [auth0 apis list](auth0_apis_list.md) - List your APIs +- [auth0 apis open](auth0_apis_open.md) - Open the settings page of an API +- [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +- [auth0 apis show](auth0_apis_show.md) - Show an API +- [auth0 apis update](auth0_apis_update.md) - Update an API + diff --git a/docs/auth0_apis_delete.md b/docs/auth0_apis_delete.md index cae49a2a9..c14eee99f 100644 --- a/docs/auth0_apis_delete.md +++ b/docs/auth0_apis_delete.md @@ -1,43 +1,54 @@ --- layout: default --- -## auth0 apis delete +# auth0 apis delete -Delete an API +Delete an API. -### Synopsis +To delete interactively, use `auth0 apis delete` with no arguments. -Delete an API. +To delete non-interactively, supply the API id and the `--force` flag to skip confirmation. +## Usage ``` auth0 apis delete [flags] ``` -### Examples +## Examples ``` -auth0 apis delete -auth0 apis delete + auth0 apis delete + auth0 apis rm + auth0 apis delete + auth0 apis delete --force ``` -### Options + +## Flags ``` - -h, --help help for delete + --force Skip confirmation. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apis](auth0_apis.md) - Manage resources for APIs +## Related Commands + +- [auth0 apis create](auth0_apis_create.md) - Create a new API +- [auth0 apis delete](auth0_apis_delete.md) - Delete an API +- [auth0 apis list](auth0_apis_list.md) - List your APIs +- [auth0 apis open](auth0_apis_open.md) - Open the settings page of an API +- [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +- [auth0 apis show](auth0_apis_show.md) - Show an API +- [auth0 apis update](auth0_apis_update.md) - Update an API + diff --git a/docs/auth0_apis_list.md b/docs/auth0_apis_list.md index 890d31a84..aedec1fe4 100644 --- a/docs/auth0_apis_list.md +++ b/docs/auth0_apis_list.md @@ -1,46 +1,51 @@ --- layout: default --- -## auth0 apis list +# auth0 apis list -List your APIs - -### Synopsis - -List your existing APIs. To create one try: -auth0 apis create +List your existing APIs. To create one, run: `auth0 apis create`. +## Usage ``` auth0 apis list [flags] ``` -### Examples +## Examples ``` -auth0 apis list -auth0 apis ls -auth0 apis ls -n 100 + auth0 apis list + auth0 apis ls + auth0 apis ls --number 100 + auth0 apis ls -n 100 --json ``` -### Options + +## Flags ``` - -h, --help help for list - -n, --number int Number of apps to retrieve (default 50) + --json Output in json format. + -n, --number int Number of APIs to retrieve. Minimum 1, maximum 1000. (default 50) ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apis](auth0_apis.md) - Manage resources for APIs +## Related Commands + +- [auth0 apis create](auth0_apis_create.md) - Create a new API +- [auth0 apis delete](auth0_apis_delete.md) - Delete an API +- [auth0 apis list](auth0_apis_list.md) - List your APIs +- [auth0 apis open](auth0_apis_open.md) - Open the settings page of an API +- [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +- [auth0 apis show](auth0_apis_show.md) - Show an API +- [auth0 apis update](auth0_apis_update.md) - Update an API + diff --git a/docs/auth0_apis_open.md b/docs/auth0_apis_open.md index 59aa52727..cc9bd5c27 100644 --- a/docs/auth0_apis_open.md +++ b/docs/auth0_apis_open.md @@ -1,43 +1,43 @@ --- layout: default --- -## auth0 apis open +# auth0 apis open -Open API settings page in the Auth0 Dashboard - -### Synopsis - -Open API settings page in the Auth0 Dashboard. +Open an APIs' settings page in the Auth0 Dashboard. +## Usage ``` auth0 apis open [flags] ``` -### Examples +## Examples ``` -auth0 apis open -auth0 apis open + auth0 apis open + auth0 apis open ``` -### Options -``` - -h, --help help for open -``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apis](auth0_apis.md) - Manage resources for APIs +## Related Commands + +- [auth0 apis create](auth0_apis_create.md) - Create a new API +- [auth0 apis delete](auth0_apis_delete.md) - Delete an API +- [auth0 apis list](auth0_apis_list.md) - List your APIs +- [auth0 apis open](auth0_apis_open.md) - Open the settings page of an API +- [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +- [auth0 apis show](auth0_apis_show.md) - Show an API +- [auth0 apis update](auth0_apis_update.md) - Update an API + diff --git a/docs/auth0_apis_scopes.md b/docs/auth0_apis_scopes.md index c6ac2a0be..86385eec1 100644 --- a/docs/auth0_apis_scopes.md +++ b/docs/auth0_apis_scopes.md @@ -1,33 +1,11 @@ --- layout: default --- -## auth0 apis scopes +# auth0 apis scopes -Manage resources for API scopes +API Scopes define the specific actions applications can be allowed to do on a user's behalf. -### Synopsis +## Commands -Manage resources for API scopes. - -### Options - -``` - -h, --help help for scopes -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 apis](auth0_apis.md) - Manage resources for APIs -* [auth0 apis scopes list](auth0_apis_scopes_list.md) - List the scopes of an API +- [auth0 apis scopes list](auth0_apis_scopes_list.md) - List the scopes of an API diff --git a/docs/auth0_apis_scopes_list.md b/docs/auth0_apis_scopes_list.md index fa25705b0..27fbeebdf 100644 --- a/docs/auth0_apis_scopes_list.md +++ b/docs/auth0_apis_scopes_list.md @@ -1,43 +1,43 @@ --- layout: default --- -## auth0 apis scopes list +# auth0 apis scopes list -List the scopes of an API - -### Synopsis - -List the scopes of an API. +List the scopes of an API. To update scopes, run: `auth0 apis update -s `. +## Usage ``` auth0 apis scopes list [flags] ``` -### Examples +## Examples ``` -auth0 apis scopes list -auth0 apis scopes ls + auth0 apis scopes list + auth0 apis scopes ls + auth0 apis scopes ls --json ``` -### Options + +## Flags ``` - -h, --help help for list + --json Output in json format. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +## Related Commands + +- [auth0 apis scopes list](auth0_apis_scopes_list.md) - List the scopes of an API + diff --git a/docs/auth0_apis_show.md b/docs/auth0_apis_show.md index a827230c0..94fea33dd 100644 --- a/docs/auth0_apis_show.md +++ b/docs/auth0_apis_show.md @@ -1,43 +1,49 @@ --- layout: default --- -## auth0 apis show +# auth0 apis show -Show an API - -### Synopsis - -Show an API. +Display the name, scopes, token lifetime, and other information about an API. +## Usage ``` auth0 apis show [flags] ``` -### Examples +## Examples ``` -auth0 apis show -auth0 apis show + auth0 apis show + auth0 apis show + auth0 apis show --json ``` -### Options + +## Flags ``` - -h, --help help for show + --json Output in json format. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apis](auth0_apis.md) - Manage resources for APIs +## Related Commands + +- [auth0 apis create](auth0_apis_create.md) - Create a new API +- [auth0 apis delete](auth0_apis_delete.md) - Delete an API +- [auth0 apis list](auth0_apis_list.md) - List your APIs +- [auth0 apis open](auth0_apis_open.md) - Open the settings page of an API +- [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +- [auth0 apis show](auth0_apis_show.md) - Show an API +- [auth0 apis update](auth0_apis_update.md) - Update an API + diff --git a/docs/auth0_apis_update.md b/docs/auth0_apis_update.md index e5da57a60..993566e29 100644 --- a/docs/auth0_apis_update.md +++ b/docs/auth0_apis_update.md @@ -1,50 +1,61 @@ --- layout: default --- -## auth0 apis update +# auth0 apis update -Update an API +Update an API. -### Synopsis +To update interactively, use `auth0 apis update` with no arguments. -Update an API. +To update non-interactively, supply the name, identifier, scopes, token lifetime and whether to allow offline access through the flags. +## Usage ``` auth0 apis update [flags] ``` -### Examples +## Examples ``` -auth0 apis update -auth0 apis update -auth0 apis update --name myapi -auth0 apis update -n myapi --token-expiration 6100 -auth0 apis update -n myapi -e 6100 --offline-access=true + auth0 apis update + auth0 apis update + auth0 apis update --name myapi + auth0 apis update --name myapi --token-lifetime 6100 + auth0 apis update --name myapi --token-lifetime 6100 --offline-access false + auth0 apis update --name myapi --token-lifetime 6100 --offline-access false --scopes "letter:write,letter:read" + auth0 apis update -n myapi -t 6100 -o false -s "letter:write,letter:read" --json ``` -### Options + +## Flags ``` - -h, --help help for update + --json Output in json format. -n, --name string Name of the API. -o, --offline-access Whether Refresh Tokens can be issued for this API (true) or not (false). -s, --scopes strings Comma-separated list of scopes (permissions). -l, --token-lifetime int The amount of time in seconds that the token will be valid after being issued. Default value is 86400 seconds (1 day). ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apis](auth0_apis.md) - Manage resources for APIs +## Related Commands + +- [auth0 apis create](auth0_apis_create.md) - Create a new API +- [auth0 apis delete](auth0_apis_delete.md) - Delete an API +- [auth0 apis list](auth0_apis_list.md) - List your APIs +- [auth0 apis open](auth0_apis_open.md) - Open the settings page of an API +- [auth0 apis scopes](auth0_apis_scopes.md) - Manage resources for API scopes +- [auth0 apis show](auth0_apis_show.md) - Show an API +- [auth0 apis update](auth0_apis_update.md) - Update an API + diff --git a/docs/auth0_apps.md b/docs/auth0_apps.md index 3fc5e88a8..21b3296ea 100644 --- a/docs/auth0_apps.md +++ b/docs/auth0_apps.md @@ -1,39 +1,17 @@ --- layout: default --- -## auth0 apps +# auth0 apps -Manage resources for applications +The term application or app in Auth0 does not imply any particular implementation characteristics. For example, it could be a native app that executes on a mobile device, a single-page application that executes on a browser, or a regular web application that executes on a server. -### Synopsis +## Commands -Manage resources for applications. - -### Options - -``` - -h, --help help for apps -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0](/auth0-cli/) - Supercharge your development workflow. -* [auth0 apps create](auth0_apps_create.md) - Create a new application -* [auth0 apps delete](auth0_apps_delete.md) - Delete an application -* [auth0 apps list](auth0_apps_list.md) - List your applications -* [auth0 apps open](auth0_apps_open.md) - Open application settings page in the Auth0 Dashboard -* [auth0 apps show](auth0_apps_show.md) - Show an application -* [auth0 apps update](auth0_apps_update.md) - Update an application -* [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI +- [auth0 apps create](auth0_apps_create.md) - Create a new application +- [auth0 apps delete](auth0_apps_delete.md) - Delete an application +- [auth0 apps list](auth0_apps_list.md) - List your applications +- [auth0 apps open](auth0_apps_open.md) - Open the settings page of an application +- [auth0 apps show](auth0_apps_show.md) - Show an application +- [auth0 apps update](auth0_apps_update.md) - Update an application +- [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI diff --git a/docs/auth0_apps_create.md b/docs/auth0_apps_create.md index c5592e43b..93a2e95b6 100644 --- a/docs/auth0_apps_create.md +++ b/docs/auth0_apps_create.md @@ -1,39 +1,43 @@ --- layout: default --- -## auth0 apps create +# auth0 apps create -Create a new application +Create a new application. -### Synopsis +To create interactively, use `auth0 apps create` with no arguments. -Create a new application. +To create non-interactively, supply at least the application name, and type through the flags. +## Usage ``` auth0 apps create [flags] ``` -### Examples +## Examples ``` -auth0 apps create -auth0 apps create --name myapp -auth0 apps create -n myapp --type [native|spa|regular|m2m] -auth0 apps create -n myapp -t [native|spa|regular|m2m] --description + auth0 apps create + auth0 apps create --name myapp + auth0 apps create --name myapp --description + auth0 apps create --name myapp --description --type [native|spa|regular|m2m] + auth0 apps create --name myapp --description --type [native|spa|regular|m2m] --reveal-secrets + auth0 apps create -n myapp -d -t [native|spa|regular|m2m] -r --json ``` -### Options + +## Flags ``` -a, --auth-method string Defines the requested authentication method for the token endpoint. Possible values are 'None' (public application without a client secret), 'Post' (application uses HTTP POST parameters) or 'Basic' (application uses HTTP Basic). -c, --callbacks strings After the user authenticates we will only call back to any of these URLs. You can specify multiple valid URLs by comma-separating them (typically to handle different environments like QA or testing). Make sure to specify the protocol (https://) otherwise the callback may fail in some cases. With the exception of custom URI schemes for native apps, all callbacks should use protocol https://. -d, --description string Description of the application. Max character count is 140. -g, --grants strings List of grant types supported for this application. Can include code, implicit, refresh-token, credentials, password, password-realm, mfa-oob, mfa-otp, mfa-recovery-code, and device-code. - -h, --help help for create + --json Output in json format. -l, --logout-urls strings Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. -n, --name string Name of the application. -o, --origins strings Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs. - -r, --reveal Display the Client Secret as part of the command output. + -r, --reveal-secrets Display the application secrets ('signing_keys', 'client_secret') as part of the command output. -t, --type string Type of application: - native: mobile, desktop, CLI and smart device apps running natively. - spa (single page application): a JavaScript front-end app that uses an API. @@ -42,18 +46,25 @@ auth0 apps create -n myapp -t [native|spa|regular|m2m] --description + auth0 apps delete + auth0 apps rm + auth0 apps delete + auth0 apps delete --force ``` -### Options + +## Flags ``` - -h, --help help for delete + --force Skip confirmation. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apps](auth0_apps.md) - Manage resources for applications +## Related Commands + +- [auth0 apps create](auth0_apps_create.md) - Create a new application +- [auth0 apps delete](auth0_apps_delete.md) - Delete an application +- [auth0 apps list](auth0_apps_list.md) - List your applications +- [auth0 apps open](auth0_apps_open.md) - Open the settings page of an application +- [auth0 apps show](auth0_apps_show.md) - Show an application +- [auth0 apps update](auth0_apps_update.md) - Update an application +- [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI + diff --git a/docs/auth0_apps_list.md b/docs/auth0_apps_list.md index 109b945f7..e8bacaa6d 100644 --- a/docs/auth0_apps_list.md +++ b/docs/auth0_apps_list.md @@ -1,47 +1,53 @@ --- layout: default --- -## auth0 apps list +# auth0 apps list -List your applications - -### Synopsis - -List your existing applications. To create one try: -auth0 apps create +List your existing applications. To create one, run: `auth0 apps create`. +## Usage ``` auth0 apps list [flags] ``` -### Examples +## Examples ``` -auth0 apps list -auth0 apps ls -auth0 apps ls -n 100 + auth0 apps list + auth0 apps ls + auth0 apps list --reveal-secrets + auth0 apps list --reveal-secrets --number 100 + auth0 apps ls -r -n 100 --json ``` -### Options + +## Flags ``` - -h, --help help for list - -n, --number int Number of apps to retrieve (default 50) - -r, --reveal Display the Client Secret as part of the command output. + --json Output in json format. + -n, --number int Number of apps to retrieve. Minimum 1, maximum 1000. (default 50) + -r, --reveal-secrets Display the application secrets ('signing_keys', 'client_secret') as part of the command output. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apps](auth0_apps.md) - Manage resources for applications +## Related Commands + +- [auth0 apps create](auth0_apps_create.md) - Create a new application +- [auth0 apps delete](auth0_apps_delete.md) - Delete an application +- [auth0 apps list](auth0_apps_list.md) - List your applications +- [auth0 apps open](auth0_apps_open.md) - Open the settings page of an application +- [auth0 apps show](auth0_apps_show.md) - Show an application +- [auth0 apps update](auth0_apps_update.md) - Update an application +- [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI + diff --git a/docs/auth0_apps_open.md b/docs/auth0_apps_open.md index b90b65039..e65066e2f 100644 --- a/docs/auth0_apps_open.md +++ b/docs/auth0_apps_open.md @@ -1,42 +1,43 @@ --- layout: default --- -## auth0 apps open +# auth0 apps open -Open application settings page in the Auth0 Dashboard - -### Synopsis - -Open application settings page in the Auth0 Dashboard. +Open an application's settings page in the Auth0 Dashboard. +## Usage ``` auth0 apps open [flags] ``` -### Examples +## Examples ``` -auth0 apps open + auth0 apps open + auth0 apps open ``` -### Options -``` - -h, --help help for open -``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apps](auth0_apps.md) - Manage resources for applications +## Related Commands + +- [auth0 apps create](auth0_apps_create.md) - Create a new application +- [auth0 apps delete](auth0_apps_delete.md) - Delete an application +- [auth0 apps list](auth0_apps_list.md) - List your applications +- [auth0 apps open](auth0_apps_open.md) - Open the settings page of an application +- [auth0 apps show](auth0_apps_show.md) - Show an application +- [auth0 apps update](auth0_apps_update.md) - Update an application +- [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI + diff --git a/docs/auth0_apps_show.md b/docs/auth0_apps_show.md index 534d7af8d..cf687314f 100644 --- a/docs/auth0_apps_show.md +++ b/docs/auth0_apps_show.md @@ -1,44 +1,51 @@ --- layout: default --- -## auth0 apps show +# auth0 apps show -Show an application - -### Synopsis - -Show an application. +Display the name, description, app type, and other information about an application. +## Usage ``` auth0 apps show [flags] ``` -### Examples +## Examples ``` -auth0 apps show -auth0 apps show + auth0 apps show + auth0 apps show + auth0 apps show --reveal-secrets + auth0 apps show -r --json ``` -### Options + +## Flags ``` - -h, --help help for show - -r, --reveal Display the Client Secret as part of the command output. + --json Output in json format. + -r, --reveal-secrets Display the application secrets ('signing_keys', 'client_secret') as part of the command output. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apps](auth0_apps.md) - Manage resources for applications +## Related Commands + +- [auth0 apps create](auth0_apps_create.md) - Create a new application +- [auth0 apps delete](auth0_apps_delete.md) - Delete an application +- [auth0 apps list](auth0_apps_list.md) - List your applications +- [auth0 apps open](auth0_apps_open.md) - Open the settings page of an application +- [auth0 apps show](auth0_apps_show.md) - Show an application +- [auth0 apps update](auth0_apps_update.md) - Update an application +- [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI + diff --git a/docs/auth0_apps_update.md b/docs/auth0_apps_update.md index 824267297..c340c2b98 100644 --- a/docs/auth0_apps_update.md +++ b/docs/auth0_apps_update.md @@ -1,38 +1,43 @@ --- layout: default --- -## auth0 apps update +# auth0 apps update -Update an application +Update an application. -### Synopsis +To update interactively, use `auth0 apps update` with no arguments. -Update an application. +To update non-interactively, supply the application id, name, type and other information you might want to change through the available flags. +## Usage ``` auth0 apps update [flags] ``` -### Examples +## Examples ``` -auth0 apps update -auth0 apps update --name myapp -auth0 apps update -n myapp --type [native|spa|regular|m2m] + auth0 apps update + auth0 apps update --name myapp + auth0 apps update --name myapp --description + auth0 apps update --name myapp --description --type [native|spa|regular|m2m] + auth0 apps update --name myapp --description --type [native|spa|regular|m2m] --reveal-secrets + auth0 apps update -n myapp -d -t [native|spa|regular|m2m] -r --json ``` -### Options + +## Flags ``` -a, --auth-method string Defines the requested authentication method for the token endpoint. Possible values are 'None' (public application without a client secret), 'Post' (application uses HTTP POST parameters) or 'Basic' (application uses HTTP Basic). -c, --callbacks strings After the user authenticates we will only call back to any of these URLs. You can specify multiple valid URLs by comma-separating them (typically to handle different environments like QA or testing). Make sure to specify the protocol (https://) otherwise the callback may fail in some cases. With the exception of custom URI schemes for native apps, all callbacks should use protocol https://. -d, --description string Description of the application. Max character count is 140. -g, --grants strings List of grant types supported for this application. Can include code, implicit, refresh-token, credentials, password, password-realm, mfa-oob, mfa-otp, mfa-recovery-code, and device-code. - -h, --help help for update + --json Output in json format. -l, --logout-urls strings Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. -n, --name string Name of the application. -o, --origins strings Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs. - -r, --reveal Display the Client Secret as part of the command output. + -r, --reveal-secrets Display the application secrets ('signing_keys', 'client_secret') as part of the command output. -t, --type string Type of application: - native: mobile, desktop, CLI and smart device apps running natively. - spa (single page application): a JavaScript front-end app that uses an API. @@ -41,18 +46,25 @@ auth0 apps update -n myapp --type [native|spa|regular|m2m] -w, --web-origins strings Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apps](auth0_apps.md) - Manage resources for applications +## Related Commands + +- [auth0 apps create](auth0_apps_create.md) - Create a new application +- [auth0 apps delete](auth0_apps_delete.md) - Delete an application +- [auth0 apps list](auth0_apps_list.md) - List your applications +- [auth0 apps open](auth0_apps_open.md) - Open the settings page of an application +- [auth0 apps show](auth0_apps_show.md) - Show an application +- [auth0 apps update](auth0_apps_update.md) - Update an application +- [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI + diff --git a/docs/auth0_apps_use.md b/docs/auth0_apps_use.md index 35c1c16c6..ad6d28b88 100644 --- a/docs/auth0_apps_use.md +++ b/docs/auth0_apps_use.md @@ -1,43 +1,49 @@ --- layout: default --- -## auth0 apps use +# auth0 apps use -Choose a default application for the Auth0 CLI - -### Synopsis - -Specify your preferred application for interaction with the Auth0 CLI. +Specify the default application used when running other commands. Specifically when downloading quickstarts and testing Universal login flow. +## Usage ``` auth0 apps use [flags] ``` -### Examples +## Examples ``` -auth0 apps use + auth0 apps use + auth0 apps use --none + auth0 apps use ``` -### Options + +## Flags ``` - -h, --help help for use -n, --none Specify none of your apps. ``` -### Options inherited from parent commands + +## InheritedFlags ``` --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. --no-color Disable colors. --no-input Disable interactivity. --tenant string Specific tenant to use. ``` -### SEE ALSO -* [auth0 apps](auth0_apps.md) - Manage resources for applications +## Related Commands + +- [auth0 apps create](auth0_apps_create.md) - Create a new application +- [auth0 apps delete](auth0_apps_delete.md) - Delete an application +- [auth0 apps list](auth0_apps_list.md) - List your applications +- [auth0 apps open](auth0_apps_open.md) - Open the settings page of an application +- [auth0 apps show](auth0_apps_show.md) - Show an application +- [auth0 apps update](auth0_apps_update.md) - Update an application +- [auth0 apps use](auth0_apps_use.md) - Choose a default application for the Auth0 CLI + diff --git a/docs/auth0_branding.md b/docs/auth0_branding.md deleted file mode 100644 index a2d2f9395..000000000 --- a/docs/auth0_branding.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: default ---- -## auth0 branding - -Manage branding options - -### Synopsis - -Manage branding options. - -### Options - -``` - -h, --help help for branding -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0](/auth0-cli/) - Supercharge your development workflow. -* [auth0 branding domains](auth0_branding_domains.md) - Manage custom domains -* [auth0 branding emails](auth0_branding_emails.md) - Manage custom email templates -* [auth0 branding show](auth0_branding_show.md) - Display the custom branding settings for Universal Login -* [auth0 branding templates](auth0_branding_templates.md) - Manage custom page templates -* [auth0 branding texts](auth0_branding_texts.md) - Manage custom text for prompts -* [auth0 branding update](auth0_branding_update.md) - Update the custom branding settings for Universal Login - diff --git a/docs/auth0_branding_domains.md b/docs/auth0_branding_domains.md deleted file mode 100644 index 8ff44e67c..000000000 --- a/docs/auth0_branding_domains.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: default ---- -## auth0 branding domains - -Manage custom domains - -### Synopsis - -Manage custom domains. - -### Options - -``` - -h, --help help for domains -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding](auth0_branding.md) - Manage branding options -* [auth0 branding domains create](auth0_branding_domains_create.md) - Create a custom domain -* [auth0 branding domains delete](auth0_branding_domains_delete.md) - Delete a custom domain -* [auth0 branding domains list](auth0_branding_domains_list.md) - List your custom domains -* [auth0 branding domains show](auth0_branding_domains_show.md) - Show a custom domain -* [auth0 branding domains update](auth0_branding_domains_update.md) - Update a custom domain -* [auth0 branding domains verify](auth0_branding_domains_verify.md) - Verify a custom domain - diff --git a/docs/auth0_branding_domains_create.md b/docs/auth0_branding_domains_create.md deleted file mode 100644 index b8d63c0c4..000000000 --- a/docs/auth0_branding_domains_create.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: default ---- -## auth0 branding domains create - -Create a custom domain - -### Synopsis - -Create a custom domain. - -``` -auth0 branding domains create [flags] -``` - -### Examples - -``` -auth0 branding domains create -auth0 branding domains create -``` - -### Options - -``` - -d, --domain string Domain name. - -h, --help help for create - -i, --ip-header string The HTTP header to fetch the client's IP address. - -p, --policy string The TLS version policy. Can be either 'compatible' or 'recommended'. - -t, --type string Custom domain provisioning type. Must be 'auth0' for Auth0-managed certs or 'self' for self-managed certs. - -v, --verification string Custom domain verification method. Must be 'txt'. -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding domains](auth0_branding_domains.md) - Manage custom domains - diff --git a/docs/auth0_branding_domains_delete.md b/docs/auth0_branding_domains_delete.md deleted file mode 100644 index 8a8b3e987..000000000 --- a/docs/auth0_branding_domains_delete.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: default ---- -## auth0 branding domains delete - -Delete a custom domain - -### Synopsis - -Delete a custom domain. - -``` -auth0 branding domains delete [flags] -``` - -### Examples - -``` -auth0 branding domains delete -auth0 branding domains delete -``` - -### Options - -``` - -h, --help help for delete -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding domains](auth0_branding_domains.md) - Manage custom domains - diff --git a/docs/auth0_branding_domains_list.md b/docs/auth0_branding_domains_list.md deleted file mode 100644 index 29d58adda..000000000 --- a/docs/auth0_branding_domains_list.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -layout: default ---- -## auth0 branding domains list - -List your custom domains - -### Synopsis - -List your existing custom domains. To create one try: -auth0 branding domains create - -``` -auth0 branding domains list [flags] -``` - -### Examples - -``` -auth0 branding domains list -auth0 branding domains ls -``` - -### Options - -``` - -h, --help help for list -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding domains](auth0_branding_domains.md) - Manage custom domains - diff --git a/docs/auth0_branding_domains_show.md b/docs/auth0_branding_domains_show.md deleted file mode 100644 index 9c4a8b4d6..000000000 --- a/docs/auth0_branding_domains_show.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: default ---- -## auth0 branding domains show - -Show a custom domain - -### Synopsis - -Show a custom domain. - -``` -auth0 branding domains show [flags] -``` - -### Examples - -``` -auth0 branding domains show -auth0 branding domains show -``` - -### Options - -``` - -h, --help help for show -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding domains](auth0_branding_domains.md) - Manage custom domains - diff --git a/docs/auth0_branding_domains_update.md b/docs/auth0_branding_domains_update.md deleted file mode 100644 index cfc32afb1..000000000 --- a/docs/auth0_branding_domains_update.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: default ---- -## auth0 branding domains update - -Update a custom domain - -### Synopsis - -Update a custom domain. - -``` -auth0 branding domains update [flags] -``` - -### Examples - -``` -auth0 branding domains update -auth0 branding domains update --policy compatible -auth0 branding domains update -p compatible --ip-header "cf-connecting-ip" -``` - -### Options - -``` - -h, --help help for update - -i, --ip-header string The HTTP header to fetch the client's IP address. - -p, --policy string The TLS version policy. Can be either 'compatible' or 'recommended'. -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding domains](auth0_branding_domains.md) - Manage custom domains - diff --git a/docs/auth0_branding_domains_verify.md b/docs/auth0_branding_domains_verify.md deleted file mode 100644 index ba836f270..000000000 --- a/docs/auth0_branding_domains_verify.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: default ---- -## auth0 branding domains verify - -Verify a custom domain - -### Synopsis - -Verify a custom domain. - -``` -auth0 branding domains verify [flags] -``` - -### Examples - -``` -auth0 branding domains verify -auth0 branding domains verify -``` - -### Options - -``` - -h, --help help for verify -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding domains](auth0_branding_domains.md) - Manage custom domains - diff --git a/docs/auth0_branding_emails.md b/docs/auth0_branding_emails.md deleted file mode 100644 index df4409762..000000000 --- a/docs/auth0_branding_emails.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: default ---- -## auth0 branding emails - -Manage custom email templates - -### Synopsis - -Manage custom email templates. This requires a custom email provider to be configured for the tenant. - -### Options - -``` - -h, --help help for emails -``` - -### Options inherited from parent commands - -``` - --debug Enable debug mode. - --force Skip confirmation. - --format string Command output format. Options: json. - --no-color Disable colors. - --no-input Disable interactivity. - --tenant string Specific tenant to use. -``` - -### SEE ALSO - -* [auth0 branding](auth0_branding.md) - Manage branding options -* [auth0 branding emails show](auth0_branding_emails_show.md) - Show an email template -* [auth0 branding emails update](auth0_branding_emails_update.md) - Update an email template - diff --git a/docs/auth0_branding_emails_show.md b/docs/auth0_branding_emails_show.md deleted file mode 100644 index 3bd0050b7..000000000 --- a/docs/auth0_branding_emails_show.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: default ---- -## auth0 branding emails show - -Show an email template - -### Synopsis - -Show an email template. - -``` -auth0 branding emails show [flags] -``` - -### Examples - -``` -auth0 branding emails show