Getting Started with Vanishing Auth

Welcome to the Vanishing Auth documentation. Here you'll find everything you need to integrate our passwordless authentication into your application.

Installation

First, you need an App ID. You can get one from your Vanishing Auth dashboard. Then, install our SDK into your project using your favorite package manager.

npm install @vanishing-auth/sdk

Or for Python:

pip install vanishing-auth

Authentication Flow

The authentication process is designed to be as simple as possible. It involves two main steps:

  1. Registration: On first sign-in, the user is prompted to create a passkey. This passkey is securely stored on their device and synced across their devices via their iCloud Keychain, Google Password Manager, or other provider.
  2. Authentication: On subsequent visits, the user can log in with a single tap using their stored passkey (e.g., via Face ID, Touch ID). Our SDK handles the cryptographic challenge-response flow securely behind the scenes.
Note: The entire process is compliant with the WebAuthn and FIDO2 standards, ensuring maximum security and interoperability.

SDKs

JavaScript SDK Example

Here's a basic example of how to implement login with our JavaScript SDK in a React application.

import { VanishingAuth } from '@vanishing-auth/sdk';
import { useState, useEffect } from 'react';

const auth = new VanishingAuth({ appId: 'YOUR_APP_ID' });

function AuthComponent() {
  const [user, setUser] = useState(null);

  const handleLogin = async () => {
    try {
      const loggedInUser = await auth.loginWithPasskey();
      setUser(loggedInUser);
    } catch (error) {
      console.error("Login failed", error);
    }
  };

  return user ? (
    <div>Welcome, {user.displayName}</div>
  ) : (
    <button onClick={handleLogin}>Login with Passkey</button>
  );
}