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

@reuters-graphics/gfx-better-auth

v0.1.0

Published

Magic-link auth for Reuters Graphics SvelteKit apps, gated to Thomson Reuters staff. An opinionated better-auth preset with the schema, routes, emails and dev flow already wired.

Downloads

173

Readme

@reuters-graphics/gfx-better-auth

Magic-link sign-in for Reuters Graphics SvelteKit apps, gated to Thomson Reuters staff. An opinionated better-auth preset with the schema, routes, emails and dev flow already wired.

This package is for Reuters Graphics apps only

The sign-in domain is hardcoded to @thomsonreuters.com and is deliberately not configurable, so the package cannot do anything useful outside Thomson Reuters. It is published publicly because that is how our own apps install it, not because it is a general-purpose library.

Full documentation lives in the repository, which is private. If you work here, start with USAGE.md. If you don't, this is unlikely to be what you want — better-auth itself almost certainly is.

Install

pnpm add @reuters-graphics/gfx-better-auth

Peers: better-auth (>=1.7.5 <1.8.0), drizzle-orm, @sveltejs/kit, svelte. Node ≥ 22, plus a Postgres and a Drizzle instance.

Four edits

// 1. src/lib/server/db/schema/index.ts
export * from '@reuters-graphics/gfx-better-auth/schema';

// 2. src/lib/server/auth.ts
import { createGfxAuth } from '@reuters-graphics/gfx-better-auth/server';
export const auth = createGfxAuth({
  db,
  appName,
  baseURL,
  secret,
  postmark,
});

// 3. src/hooks.server.ts
import { building } from '$app/environment';
export const handle = sequence(gfxAuth({ auth, building }), myHandle);

// 4. src/app.d.ts
interface Locals extends GfxAuthLocals {}

Then pnpm db:generate && pnpm db:migrate.

⚠️ gfxAuth must come before anything reading event.locals.user. Pass building if your app prerenders anything.

What you get

Magic-link sign-in gated at the endpoint; sign-in, sent, confirm and sign-out pages served from the hook with no route files and no JavaScript; event.locals.user and .session; a route guard; and a development flow that needs no credentials.

You do not get roles or permissions — this package proves who someone is, not what they may do.

Entry points

| | | | ---------- | --------------------------------------------------------- | | . | Types and the domain helpers. Safe anywhere | | ./schema | The four Drizzle tables, and columns to spread | | ./server | 🚨 createGfxAuth, the handle, requireUser, signInAs | | ./client | The browser client. Optional | | ./emails | The sign-in email, and InactiveRecipientError |

Everything else

Configuration, session semantics, extending the user model, testing, and the reasoning behind any of it: see USAGE.md in the repository.


MIT · Reuters Graphics