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

@faable/auth-sdk

v1.3.25

Published

<p align="center"> <a href="https://faable.com"> <h1 align="center">Faable Auth SDK</h1> </a> <p align="center">Server-side client for the FaableAuth administrative REST API.</p> </p>

Readme

Programmatically manage FaableAuth users, teams, connections and clients through the FaableAuth REST API.

⚠️ Server-side only. This SDK uses administrative credentials. Never ship it to a browser or any untrusted runtime.


Install

npm install @faable/auth-sdk

Authentication

The SDK accepts any auth strategy from @faable/sdk-base. Two strategies are typically used:

Client credentials (recommended)

Reads FAABLE_CLIENT_ID, FAABLE_CLIENT_SECRET and FAABLE_DOMAIN from the environment by default:

import { FaableAuthApi } from "@faable/auth-sdk";
import { createClientCredentials } from "@faable/sdk-base";

const api = FaableAuthApi.create({
  auth: createClientCredentials(),
  team_id: "team_xxxxxxxxxxxxxxxxxxxxxxxx",
});

You may also pass credentials explicitly:

const auth = createClientCredentials({
  client_id: process.env.FAABLE_CLIENT_ID!,
  client_secret: process.env.FAABLE_CLIENT_SECRET!,
  domain: "faable.auth.faable.link",
});

API key

import { FaableAuthApi } from "@faable/auth-sdk";
import { createApikeyAuth } from "@faable/sdk-base";

const api = FaableAuthApi.create({
  auth: createApikeyAuth("fak_xxxxxxxxxxxxxxxx"),
  team_id: "team_xxxxxxxxxxxxxxxxxxxxxxxx",
});

Constructor options

| Option | Type | Description | | ------------ | -------- | -------------------------------------------------------------------------------------------- | | auth | strategy | Auth strategy from @faable/sdk-base. Required. | | team_id | string | Scopes calls to a specific team (sent as x-faable-team header). | | account_id | string | Scopes calls to a specific FaableAuth account (sent as x-faableauth-account header). | | domain | string | Override the API host. Defaults to https://faable.auth.faable.link. | | debug | boolean | Enables verbose logging in the underlying fetcher. |


Usage

Users

// Get a user
const user = await api.getUser("user_xxx");

// Create a user
const created = await api.createUser({
  email: "[email protected]",
  password: "•••••••••",
});

// Update a user
const updated = await api.updateUser("user_xxx", { phone: "+34XXXXXXXXX" });

// List users (paginated) — first page of 30
const firstPage = await api.listUsers().first();

// Filter by email
const matches = await api.listUsers({ email: "[email protected]" }).first();

// Iterate every page
for await (const page of api.listUsers()) {
  for (const user of page) {
    // ...
  }
}

User metadata

const metadata = await api.getUserMetadata("user_xxx");

await api.setUserMetadata("user_xxx", {
  onboarded: true,
  plan: "pro",
});

Teams

const team = await api.getTeam("team_xxx");

const newTeam = await api.createTeam({ name: "Acme Inc." });

await api.deleteTeam("team_xxx");

const myTeams = await api.listTeams({ user_id: "user_xxx" }).first();

Team members

const members = await api.listTeamMembers({ query: "alice" }).first();

const isMember = await api.isUserMemberOfTeam("user_xxx", "team_xxx");

Connections

const connections = await api.listConections().first();
const connection = await api.getConection("conn_xxx");

Clients

const clients = await api.listClients().first();
const client = await api.getClient("client_xxx");

Current account

const account = await api.currentAccount();

Pagination

List methods return a paginator. Use .first() to grab the first page or iterate with for await ... of to walk all pages:

const paginator = api.listUsers();

const firstPage = await paginator.first();

for await (const page of paginator) {
  // each `page` is an array of items
}

Types

All response shapes are generated from the OpenAPI spec and re-exported from the package root:

import type { User, Team, TeamMember, Connection, Client } from "@faable/auth-sdk";

License

MIT