@pedwise/next-firebase-auth-edge
Version:
Next.js 13 Firebase Authentication for Edge and server runtimes. Dedicated for Next 13 server components. Compatible with Next.js middleware.
23 lines (22 loc) • 644 B
TypeScript
import { DecodedIdToken } from "./token-verifier";
export type Claims = {
[key: string]: any;
};
export type Tenant = {
uid: string;
customClaims: Claims;
email?: string;
emailVerified: boolean;
phoneNumber?: string;
displayName?: string;
photoURL?: string;
token?: string | null;
};
type CreateTenantOptions = {
decodedToken?: DecodedIdToken | null;
token?: string | null;
};
export declare const STANDARD_CLAIMS: string[];
export declare const filterStandardClaims: (obj?: Claims) => Claims;
export declare const createTenant: ({ decodedToken, token, }?: CreateTenantOptions) => Tenant;
export {};