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

authentifier

v1.0.0

Published

Simple authentication library for Firebase, Supabase, and AppWrite

Downloads

111

Readme

Authentifier

One line of code to add authentication to any app.

A lightweight, zero-config authentication library that works with Firebase, Supabase, and AppWrite using a unified API.

npm install authentifier
npx authentifier  # Generate config

Features

  • Zero Config - Run CLI, paste credentials, done
  • Unified API - Same code for all providers
  • TypeScript - Full type support out of the box
  • Tree-shakable - Only bundle what you use
  • Browser Ready - Works in any frontend framework

Supported Providers

| Provider | Status | |----------|--------| | 🔥 Firebase | Production Ready | | ⚡ Supabase | Production Ready | | 📦 AppWrite | Production Ready |

Quick Start

1. Install

npm install authentifier

2. Generate Config

npx authentifier

Choose your provider and enter your credentials. The CLI generates auth.config.js for you.

3. Use It

import auth from './auth.config.js';

// Sign up
const result = await auth.signUp('John', '[email protected]', 'password123');

// Sign in
const login = await auth.signIn('[email protected]', 'password123');

// Get user
const user = auth.getCurrentUser();

// Check if logged in
auth.isAuthenticated();  // true

// Sign out
await auth.signOut();

CLI Usage

Interactive Mode

npx authentifier

Quick Mode

# Firebase
npx authentifier --firebase --apiKey=xxx --authDomain=xxx --projectId=xxx --appId=xxx

# Supabase
npx authentifier --supabase --url=xxx --anonKey=xxx

# AppWrite
npx authentifier --appwrite --projectId=xxx

Configuration

The CLI generates this config file for you. You don't need to write it manually.

Firebase (auth.config.js)

import { Auth } from 'authentifier';

const auth = new Auth({
  service: 'firebase',
  config: {
    apiKey: 'AIzaSy...',
    authDomain: 'myapp.firebaseapp.com',
    projectId: 'my-app',
    appId: '1:123:web:abc'
  }
});

export default auth;

Supabase (auth.config.js)

import { Auth } from 'authentifier';

const auth = new Auth({
  service: 'supabase',
  config: {
    url: 'https://xyzcompany.supabase.co',
    anonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
  }
});

export default auth;

AppWrite (auth.config.js)

import { Auth } from 'authentifier';

const auth = new Auth({
  service: 'appwrite',
  config: {
    endpoint: 'https://cloud.appwrite.io/v1',
    projectId: 'my-project-id'
  }
});

export default auth;

API Reference

Auth Class

const auth = new Auth({ service, config });

Methods

| Method | Description | |--------|-------------| | signUp(name, email, password) | Create new user account | | signIn(email, password) | Sign in existing user | | signOut() | Sign out current user | | getCurrentUser() | Get logged in user or null | | isAuthenticated() | Check if user is logged in |

Returns

{
  user: {
    id: string;
    name: string;
    email: string;
  }
}

Error Handling

try {
  const result = await auth.signUp('John', '[email protected]', 'password123');
} catch (error) {
  if (error.message.includes('email-already-exists')) {
    // Handle duplicate email
  } else if (error.message.includes('weak-password')) {
    // Handle weak password
  }
}

Direct Adapter Usage

import { FirebaseAdapter, SupabaseAdapter, AppWriteAdapter } from 'authentifier';

const adapter = new FirebaseAdapter(firebaseConfig);
const result = await adapter.signUp('John', '[email protected]', 'password');

TypeScript

import { Auth, AuthService, SignUpResult, User } from 'authentifier';

const auth = new Auth({
  service: 'firebase' as AuthService,
  config: firebaseConfig
});

const result: SignUpResult = await auth.signUp('John', '[email protected]', 'pass');
const user: User = result.user;

Bundle Size

| Provider | Minified + Gzipped | |----------|-------------------| | All (bundled) | ~84 KB | | Firebase only | ~40 KB | | Supabase only | ~30 KB | | AppWrite only | ~15 KB |

Requirements

  • Node.js 14+ (for CLI and SSR)
  • Modern browsers (Chrome, Firefox, Safari, Edge)

License

MIT