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

@sedge-hq/oauth

v0.2.1

Published

OAuth sign-in for sedge: Google, Microsoft and any other provider, for channels and signals to share.

Readme

@sedge-hq/oauth

OAuth sign-in for sedge, the always-on agent: sign in once to Google, Microsoft or another provider, and let several channels and signals use the account.

A kind asks for an account with the kit's account(...) setting, naming the providers it takes, each with the scopes it needs:

import { account } from '@sedge-hq/kit';
import { google, microsoft, SCOPES } from '@sedge-hq/oauth';

settings: {
    login: account('Your Google or Microsoft account', [
        google([SCOPES.gmail]),
        microsoft([SCOPES.outlookImap, SCOPES.outlookSmtp]),
    ]),
}
// later: const token = await settings.login.token();

sedge runs the sign-in in the browser (the authorization-code flow with PKCE, coming back to a page on this machine), keeps the refresh token in the keychain, and refreshes access tokens before they expire. A token that comes with no lifetime and no refresh token (GitHub's) is kept in the keychain as it is. Kinds only ever get access tokens, for the scopes they declared.

The providers here:

  • google, microsoft: mail, calendars and the rest of their APIs.
  • github: an OAuth app of your own, with the callback URL http://127.0.0.1/ (GitHub lets the port differ). It wants the client secret even with PKCE. The account is named by its login.
  • slack: as the user, not a bot. Slack lets an app that signs in on a computer (PKCE, coming back to http://localhost:53682/) ask only for user scopes, which it reads from authed_user. The account is named by the user and workspace.

SCOPES names what kinds commonly ask for (gmail, githubRepo, slackChatWrite …).

defineProvider adds any OAuth 2 provider: its endpoints and extra sign-in parameters, PKCE, the redirect host (loopback) and a fixed port when the provider matches it exactly, how early to refresh (refreshBefore), how long a token lasts when it doesn't say (lifetime), whether a refresh asks for the scopes again (scopeOnRefresh), the sign-in parameter for scopes and their separator (scopeParam, scopeSeparator), where the token sits in the answer (tokenPath), and an identity address that says who signed in when there's no ID token. Granted scopes are read whether the provider separates them with spaces or commas.

Accounts and sign-in · MIT