UNPKG

@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.

21 lines (20 loc) 906 B
import { CryptoSigner } from "./jwt/crypto-signer"; import { ServiceAccountCredential } from "./credential"; export declare const BLACKLISTED_CLAIMS: string[]; export declare class EmulatedSigner implements CryptoSigner { algorithm: "none"; sign(token: string): Promise<string>; getAccountId(): Promise<string>; } export declare class FirebaseTokenGenerator { readonly tenantId?: string | undefined; private readonly signer; constructor(signer: CryptoSigner, tenantId?: string | undefined); createCustomToken(uid: string, developerClaims?: { [key: string]: any; }): Promise<string>; private static encodeSegment; private static isDeveloperClaimsValid_; } export declare function handleCryptoSignerError(err: Error): Error; export declare function createFirebaseTokenGenerator(credential: ServiceAccountCredential, tenantId?: string): FirebaseTokenGenerator;