UNPKG

@alpha018/nestjs-firebase-auth

Version:

NestJS Firebase library and Role based guard for authentication with some utils functions

15 lines (14 loc) 684 B
import { App } from 'firebase-admin/app'; import { DecodedIdToken } from 'firebase-admin/lib/auth'; import { FirebaseConstructorInterface } from '../interface/firebase-constructor.interface'; export declare class FirebaseProvider { private readonly data; get auth(): import("firebase-admin/lib/auth").Auth; get app(): App; private readonly _app; private get rolesKey(); constructor(data: FirebaseConstructorInterface); getClaimsRoleBase<T>(user: DecodedIdToken, localDecode: boolean): Promise<undefined | T[]>; setClaimsBase(uid: string, claims: Record<string, any>): Promise<void>; setClaimsRoleBase<T>(uid: string, claims: T[]): Promise<void>; }