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

@nerdfolio/ba-guest-list

v0.1.2

Published

Similar to anonymous, but with a name that must be on a guest list. Useful for testing or demo with fixed logins

Readme

Better Auth Guest List

Plugin to provide fixed guest list login functionality for better-auth.

Intended use is for development testing and possibly demos with known login names, e.g. login as "Alice" or "Bob". You can use it with a single-input form or binding a name to a submit button. Names are single-word and case-insensitive.

The fixed guest list is defined on the server-side with optional roles so this plugin can also be used for testing roles. You can optionally reveal the server guest list to the client (useful for demo login scenarios).

THIS IS NOT MEANT FOR SECURE PRODUCTION APP!

How It Works

This plugin does not add any field to the schema as its intended use is temporary for testing and demos.

Internally, the guest name is transformed into an email via a fixed template, e.g. tom.onguestlist@emaildomain and that is the way users will be looked up.

Installation


pnpm add @nerdfolio/ba-guest-list

Server-side setup

// auth.ts
import { betterAuth } from "better-auth"
import { guestList } from "@nerdfolio/ba-guest-list"

export const auth = betterAuth({
	...otherConfigs,
	plugins: [
		...otherPlugins,
		guestList({
			allowGuests: [
				// required: can be array of names or array of {name: string, role?: comma-separated-string}
				{ name: "Alice", role: "admin" },
				{ name: "Bob", role: "user" },
				{ name: "Charlie", role: "user" },
			],
			// optional: whether the client can see this list (useful for demos)
			revealNames: true
		})
	],
})

Options:

allowGuests: can be an array of names or array of {name: string, role?: string}. Role follows better-auth convention as a comma-separated string of actual roles.

revealNames: is a boolean. When enabled, the client will be able to retrieve the guest names via client.signIn.guestList.reveal(). Names may also be returned in api errors during logins. When undefined or disabled, the reveal() endpoint will just return null and names will not be sent in error messages.

emailDomainName: optional. Internally this plugin generates a fake email based on the guest name. It detects the app's domain and use that for email generation. You can override that with this option.

Client-side setup


import { guestListClient } from "@nerdfolio/ba-guest-list"

export const authClient = createAuthClient({
	plugins: [
		guestListClient()
	],
})

Usage


// GUEST_NAME has to be in the list of names defined in server-side setup, otherwise login will fail
authClient.signIn.guestList({
	name: GUEST_NAME
})

If you have enabled revealNames in your server-side setup, you can retrieve that list of names on the client side via signIn.guestList.reveal(). This may be useful for creating demos with a fixed list of login names as client-side hints.

// just an async so you'll need to use it according to the way
// your frontend framework handles async

const guestNames = await authClient.signIn.guestList.reveal()
  .then(({ data, error: _e }) => data?.join(", "))
)

// for example, in Solidstart, you can retrieve this via createAsync
const guestList = createAsync(async () =>
	authClient.signIn.guestList.reveal().then(({ data, error: _e }) => data?.join(", "))
)