Skip to content
shield

GitHub Action

Retrieve Auth0 Access Token

v1.0.2 Latest version

Retrieve Auth0 Access Token

shield

Retrieve Auth0 Access Token

Auth0 login management for your GitHub Actions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Retrieve Auth0 Access Token

uses: Kajatin/auth0-login@v1.0.2

Learn more about this action in Kajatin/auth0-login

Choose a version

auth0-login v1

GitHub Super-Linter CI Check dist/ CodeQL Coverage

This action logs into Auth0 and returns the access token.

Usage

- uses: Kajatin/auth0-login@v1
  with:
    # The Auth0 tenant domain to request the access token from.
    tenant-url: 'https://your-tenant.auth0.com'

    # The client ID of the application that is requesting the access token.
    # Required: true
    client-id: 'xD3f4u1t'

    # The client secret of the application that is requesting the access token.
    # Required: true
    client-secret: 's3cr3t'

    # The audience of the access token.
    audience: ''

    # The grant type of the access token.
    # Default: client_credentials
    grant-type: ''

Outputs

If the action successfully logs into Auth0, it will return the following outputs:

  • access-token: The access token that was retrieved from Auth0.

How to update the action

  1. Create a new branch

    git checkout -b releases/v1
  2. Replace the contents of src/ with your action code

  3. Add tests to __tests__/ for your source code

  4. Format, test, and build the action

    npm run all

    This step is important! It will run ncc to build the final JavaScript action code with all dependencies included. If you do not run this step, your action will not work correctly when it is used in a workflow. This step also includes the --license option for ncc, which will create a license file for all of the production node modules used in your project.

  5. Commit your changes

    git add .
    git commit -m "My first action is ready!"
  6. Push them to your repository

    git push -u origin releases/v1
  7. Create a pull request and get feedback on your action

  8. Merge the pull request into the main branch

The action is now published! 🚀

For information about versioning your action, see Versioning in the GitHub Actions toolkit.

Publishing a New Release

This project includes a helper script, script/release designed to streamline the process of tagging and pushing new releases for GitHub Actions.

GitHub Actions allows users to select a specific version of the action to use, based on release tags. This script simplifies this process by performing the following steps:

  1. Retrieving the latest release tag: The script starts by fetching the most recent release tag by looking at the local data available in your repository.
  2. Prompting for a new release tag: The user is then prompted to enter a new release tag. To assist with this, the script displays the latest release tag and provides a regular expression to validate the format of the new tag.
  3. Tagging the new release: Once a valid new tag is entered, the script tags the new release.
  4. Pushing the new tag to the remote: Finally, the script pushes the new tag to the remote repository. From here, you will need to create a new release in GitHub and users can easily reference the new tag in their workflows.