npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@australiangreens/auth0-actions-mgmtapi

v1.0.0

Published

A helper library for using auth0's Management API within auth0 Actions

Readme

Auth0 Actions Management API helper

Introduction

This package is designed as a helper for custom code running inside Auth0 Actions.

It is often desirable to have custom Actions that invoke Auth0's Management API to update attributes of a user record. This package provides two features:

  • a simple method for creating a management API client object; and
  • caching the management API token in the Auth0 Actions cache.

Caching the token means that it can be reused across all Actions in the same flow, thus reducing the number of M2M API tokens issued.

Note: you do not need this package if you only intend to update user app_metadata or user_metadata.

You can use api.user.setUserMetadata(name, value) and api.user.setAppMetadata(name, value) for most user update concerns. This library is for uses beyond updating metadata (such as root-level user attributes).

Requirements

This package supports the following tooling versions:

  • auth0: >= 4.18
  • Node.js: >=18

Installation

Add this package as a dependency to your Actions as per the Auth0 documentation on managing dependencies.

Reference this package as @australiangreens/auth0-actions-mgmtapi.

Configuration

The package expects the following secrets exist in your Action:

  • M2M_DOMAIN
  • M2M_CLIENT_ID
  • M2M_CLIENT_SECRET
  • audience

The values for these secrets can be obtained from the Machine-to-Machine Application you must create for your Actions to be able to use the management API at all.

Usage

Load the package at the top of your Action code:

const { createManagementClient } = require('@australiangreens/auth0-actions-mgmtmapi');

Create your management client inside your Action handler functions. You must use the await keyword:

const managementClient = await createManagementClient(event.secrets, api.cache);

Note: you must create the client inside the handler functions to be able to properly pass through the Action secrets and Action cache object to the function.

Use your management client as per Auth0's node-auth0 documentation.