MOR-PROC-012 Version 1 last review date: Oct, 2024
1. Auth0 CLI Tool Overview
The Auth0 CLI Tool provides an alternative method of managing Auth0 settings. In particular, there are certain customisations that can only be completed with the CLI tool, namely universal-login widget changes beyond logo and colour changes. MoreCore utilises such customisations to display the 'MFA guide' messge on 'MFA' related views of the auth0 login widget.
Links
- https://developer.auth0.com/resources/labs/tools/auth0-cli-basics#introduction (opens in a new tab)
- https://auth0.com/docs/secure/tokens/access-tokens/get-management-api-access-tokens-for-testing (opens in a new tab)
- https://auth0.com/docs/api/management/v2 (opens in a new tab)
1.1. CLI Tool Installation
Follow the directions for your OS found here https://developer.auth0.com/resources/labs/tools/auth0-cli-basics#introduction (opens in a new tab). Installers can be found here: https://github.com/auth0/auth0-cli/releases (opens in a new tab)
Further steps assume a Windows installation.
2. Using the Auth0 CLI Tool
2.1. Process
Open Command Prompt
Navigate to the installation folder
Enter 'auth0 login'
- A browser window will open allowing credentials to be entered.
- Select 'As a User' when prompted 'How would you like to authenticate?'
- Press Enter to open the auth browser window.
- Enter credentials if necessary. If you are already logged in to Auth0 th
- Confirm the code.
- Be sure to select the correct tenancy.
- Click 'Accept'.
- Return to the Command prompt window.
Run necessary commands
2.2. Commands
| Command | Purpose | Notes |
|---|---|---|
| auth0 login | Sign in to Auth0 via the CLI tool | |
| auth0 universal-login customize | Edit the Universal Login template | Only works when a custom domain is in place. This is the one you're likely here to do. See the below section on how to use this. |
| auth0 logout | Signs out the CLI tool. | Perform this after completing updates. |
2.2.1. auth0 universal-login customize
Running this command will launch a browser window with a UI for editing the login widget.