universal_authentication
Version:
Seamless and Secure Authentication for Modern Web Applications: Easily integrate OTP-based email verification, Google OAuth, GitHub, Microsoft, and Okta login into your Node.js app. Modular, flexible, and database-agnostic, this package simplifies user au
15 lines (12 loc) • 402 B
text/typescript
import { IOAuthConfig } from "../interface/OAuth.interface";
// Define the types for the functions that the app will use
export type InitiateLogin = (
provider: "google" | "microsoft" | "github",
clientId: string,
redirectUri: string
) => any;
export type HandleCallback = (
provider: "google" | "microsoft" | "github",
code: string,
congif: IOAuthConfig
) => Promise<any>;