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

authify-pro

v1.0.4

Published

A flexible authentication package with multiple login options

Readme

Authify-Pro

A flexible authentication package for Node.js applications that provides multiple authentication methods including email/password, OAuth (Google, GitHub, Microsoft), and SSO integration.

Features

  • 🔐 Multiple Authentication Methods:

    • Email/Password Authentication
    • OAuth Support (Google, GitHub, Microsoft)
    • SSO Integration
    • Security Questions Option
    • OTP Verification
  • 📧 Email Features:

    • Customizable Email Templates
    • OTP Delivery
    • HTML Email Support
    • Custom SMTP Configuration
  • 🔒 Security:

    • JWT Token Based Authentication
    • Multiple Hashing Algorithms
    • Password Strength Validation
    • Rate Limiting Support
  • 🛠️ Customization:

    • Configurable Token Expiry
    • Custom Email Templates
    • Flexible OAuth Settings
    • Custom Security Questions

Installation

npm install authify-pro

Quick Start

import express from 'express';
import AuthenticationPackage from 'authify-pro';

const app = express();

const authPackage = new AuthenticationPackage({
  mongoURI: 'your-mongodb-uri',
  jwtSecret: 'your-jwt-secret',
  emailConfig: {
    service: 'gmail',
    auth: {
      user: '[email protected]',
      pass: 'your-password'
    }
  }
});

// Use the authentication routes
app.use(authPackage.getRouter());

Configuration Options

interface IAuthConfig {
  // Required
  mongoURI: string;
  jwtSecret: string;

  // Optional
  baseUrl?: string;
  verificationMethod?: 'email' | 'security_question' | 'none';
  sessionDuration?: string;

  // Email Configuration
  emailConfig?: {
    service: string;
    auth: {
      user: string;
      pass: string;
    };
    templateConfig?: {
      companyName?: string;
      brandColor?: string;
      supportEmail?: string;
    }
  };

  // OAuth Configuration
  oauth?: {
    google?: {
      clientId: string;
      clientSecret: string;
    };
    github?: {
      clientId: string;
      clientSecret: string;
    };
    microsoft?: {
      clientId: string;
      clientSecret: string;
    }
  };
}

Usage Examples

Basic Email/Password Authentication

const authPackage = new AuthenticationPackage({
  mongoURI: 'mongodb://localhost:27017/your-db',
  jwtSecret: 'your-secret-key',
  verificationMethod: 'email'
});

OAuth Integration

const authPackage = new AuthenticationPackage({
  mongoURI: 'mongodb://localhost:27017/your-db',
  jwtSecret: 'your-secret-key',
  oauth: {
    google: {
      clientId: 'your-google-client-id',
      clientSecret: 'your-google-client-secret'
    },
    github: {
      clientId: 'your-github-client-id',
      clientSecret: 'your-github-client-secret'
    }
  }
});

Custom Email Template

const authPackage = new AuthenticationPackage({
  // ... other config
  emailConfig: {
    service: 'gmail',
    auth: {
      user: '[email protected]',
      pass: 'your-password'
    },
    templateConfig: {
      companyName: 'Your Company',
      brandColor: '#007bff',
      supportEmail: '[email protected]'
    }
  }
});

Available Routes

Authentication Routes

  • POST /auth/signup - Register new user
  • POST /auth/login - Login
  • POST /auth/verify - Verify OTP
  • GET /auth/logout - Logout

OAuth Routes

  • GET /auth/google - Google OAuth
  • GET /auth/github - GitHub OAuth
  • GET /auth/microsoft - Microsoft OAuth

SSO Routes

  • GET /login - SSO Login
  • GET /callback - SSO Callback
  • GET /logout - SSO Logout

Security

The package includes several security features:

  • Password hashing using multiple algorithms
  • JWT token encryption
  • Rate limiting capabilities
  • CORS support
  • XSS protection
  • Secure cookie options

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the ISC License.

Support

For support, please raise an issue in the GitHub repository or contact [email protected] .

Author

Vishvam Amin