Welcome to Authify

Enterprise-grade authentication infrastructure for modern applications

What is Authify?

Authify is a complete authentication platform that provides developers with everything they need to add secure, scalable authentication to their applications. Built with multi-tenancy at its core, Authify supports multiple authentication methods, MFA, and enterprise features out of the box.

Key Features

  • ✅ Email/Password Authentication with bcrypt hashing
  • ✅ Magic Link (Passwordless) authentication
  • ✅ Social Login (Google, GitHub) via OAuth
  • ✅ Multi-Factor Authentication (MFA) with TOTP
  • ✅ Multi-Tenancy with isolated data
  • ✅ Rate Limiting & Subscription Management
  • ✅ JWKS & Automatic Key Rotation
  • ✅ React, Vue, and Angular SDKs

Architecture Overview

Authify consists of three main components:

Backend Server: Express.js server with SQLite database, handling authentication, multi-tenancy, rate limiting, and subscription management.
Core SDK: Framework-agnostic authentication client with state management, API communication, and session handling.
Framework SDKs: React, Vue, and Angular integrations providing components, hooks/composables, and services.

Quick Start

Get up and running with Authify in minutes

1. Start the Backend

First, clone the repository and start the authentication server:

Terminal
cd Authify
npm install
npm run dev --workspace=@authify/backend

The backend will start on http://localhost:5000

Default Credentials:
Tenant ID: dev_tenant_1
API Key: dev_api_key_123

2. Run a Demo Application

Choose your preferred framework and run the demo:

React Vue Angular
npm run dev --workspace=react-demo
# Open http://localhost:5173
npm run dev --workspace=vue-demo
# Open http://localhost:5174
npm run dev --workspace=angular-demo
# Open http://localhost:4200

3. Test Authentication

Try signing up with an email and password, or use social login with Google!

Note: For social login to work, you need to configure your Google OAuth credentials in the backend .env file.

Installation

Add Authify to your existing project

Frontend Packages

Install the core package and the specific SDK for your framework:

Terminal
# For React
npm install @authify/react @authify/core

# For Vue
npm install @authify/vue @authify/core

# For Angular
npm install @authify/angular @authify/core

Backend Setup

If you are self-hosting the Authify backend, you can install it via npm or clone the repo:

Terminal
git clone https://github.com/authify/authify.git
cd Authify/AuthifyCore/backend
npm install
npm run dev

Authentication

Learn about the various authentication methods supported by Authify

Email & Password

Traditional authentication using email and hashed passwords (bcrypt).

Code Example
await auth.signIn({ 
  email: 'user@example.com', 
  password: 'secure-password' 
});

Social Login (OAuth)

Support for Google and GitHub out of the box.

Code Example
auth.signInWithProvider('google');

Multi-Tenancy

Isolation and customization for enterprise consumers

What is Multi-Tenancy?

Authify allows you to serve multiple independent organizations (tenants) from a single backend instance. Each tenant has its own isolated users, settings, and credentials.

Dynamic Google OAuth Configuration PRO

Consumers can now supply their own Google OAuth credentials directly in the frontend configuration. This is ideal for white-label solutions where each client wants to use their own Google App identity.

Config Example
const authConfig = {
  clientId: 'tenant_abc_123',
  apiKey: 'ak_live_...',
  domain: 'auth.your-service.com',
  // Dynamic Google Credentials
  googleClientId: 'your-google-client-id.apps.googleusercontent.com',
  googleClientSecret: 'your-google-client-secret',
  googleCallbackUrl: 'https://auth.your-service.com/auth/google/callback'
};
Security Warning: Passwords and secrets should be handled with care. If not supplied, Authify falls back to the backend's environment variables but will log a warning for tenants.

React SDK

Complete authentication for React applications with hooks and components

Installation

Terminal
npm install @authify/react @authify/core

Setup Provider

Wrap your app with the AuthifyProvider and configure your tenant credentials:

main.tsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { AuthifyProvider } from '@authify/react';
import '@authify/core/styles.css';

const authConfig = {
  clientId: 'dev_tenant_1',
  apiKey: 'dev_api_key_123',
  domain: 'localhost:5000',
  // Optional: Supply your own Google OAuth credentials
  googleClientId: '...',
  googleClientSecret: '...',
  googleCallbackUrl: '...'
};

ReactDOM.createRoot(document.getElementById('root')!).render(
  
    
      
    
  
);

Using the useAuth Hook

Access authentication state and methods with the useAuth hook:

App.tsx
import { SignIn, UserButton, useAuth } from '@authify/react';

function App() {
  const { isSignedIn, user, isLoaded } = useAuth();

  if (!isLoaded) return 
Loading...
; return (
{isSignedIn ? ( <>

Welcome, {user?.name}!

) : ( )}
); }

Available Hooks

useAuth()

Main authentication hook providing state and methods:

  • isSignedIn - Boolean indicating if user is authenticated
  • user - Current user object
  • isLoaded - Boolean indicating if auth state is loaded
  • signIn(email) - Send magic link
  • signOut() - Sign out current user
  • signInWithProvider(provider) - Social login
  • verifyMFA(code) - Verify MFA code NEW

Live Example

Interactive sandbox would render here in production

Vue SDK

Complete authentication for Vue 3 applications with composables and components

Installation

Terminal
npm install @authify/vue @authify/core

Setup Plugin

Install the Authify plugin in your Vue app:

main.ts
import { createApp } from 'vue';
import App from './App.vue';
import { AuthifyPlugin } from '@authify/vue';
import '@authify/core/styles.css';

const app = createApp(App);

app.use(AuthifyPlugin, {
  config: {
    clientId: 'dev_tenant_1',
    apiKey: 'dev_api_key_123',
    domain: 'localhost:5000',
    // Optional: Supply your own Google OAuth credentials
    googleClientId: '...',
    googleClientSecret: '...',
    googleCallbackUrl: '...'
  }
});

app.mount('#app');

Using the useAuth Composable

Access authentication state with the useAuth composable:

App.vue
<script setup>
import { SignIn, UserButton, useAuth } from '@authify/vue';

const { isSignedIn, user, isLoaded } = useAuth();
</script>

<template>
  <div v-if="!isLoaded">Loading...</div>
  <div v-else>
    <div v-if="isSignedIn">
      <h1>Welcome, {{ user?.name }}!</h1>
      <UserButton />
    </div>
    <SignIn v-else />
  </div>
</template>

Angular SDK

Complete authentication for Angular applications with services and components

Installation

Terminal
npm install @authify/angular @authify/core

Setup Module

Import and configure the AuthifyModule:

app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AuthifyModule } from '@authify/angular';
import '@authify/core/styles.css';

@NgModule({
  imports: [
    BrowserModule,
    AuthifyModule.forRoot({
      clientId: 'dev_tenant_1',
      apiKey: 'dev_api_key_123',
      domain: 'localhost:5000',
      // Optional: Supply your own Google OAuth credentials
      googleClientId: '...',
      googleClientSecret: '...',
      googleCallbackUrl: '...'
    })
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Using the AuthService

Inject the AuthService to access authentication state:

app.component.ts
import { Component } from '@angular/core';
import { AuthService } from '@authify/angular';

@Component({
  selector: 'app-root',
  template: `
    
Loading...

Welcome, {{ (authService.user$ | async)?.name }}!

` }) export class AppComponent { constructor(public authService: AuthService) {} }

Rate Limiting

Protect your API from abuse

Adaptive Rate Limiting

Authify includes built-in rate limiting based on tenant plans. Free tiers are limited to 200 authentication operations per month.

Multi-Factor Auth

Secure accounts with an extra layer of protection

TOTP Support

Authify supports Time-based One-Time Passwords (TOTP) compatible with Google Authenticator and Authy.

Authentication API

Direct REST API endpoints for custom integrations

POST /auth/login

Authenticate a user with email and password.

{
  "email": "user@example.com",
  "password": "password123"
}

Admin API

JWKS & Security

Subscriptions

Key Rotation

Audit Logs