UNPKG

kinde-angular

Version:

Angular wrapper for the Kinde TypeScript SDK

31 lines (30 loc) 1.4 kB
import { KindeClient } from "./interfaces/kinde-client.interface"; import { UserType } from "@kinde-oss/kinde-typescript-sdk"; import * as i0 from "@angular/core"; export declare class AuthStateService { private kindeClient; /** * A variant of Subject that requires an initial value and emits its current value whenever it is subscribed to. * We use BehaviorSubject because we want the initial value to be true */ private isLoadingSubject$; /** * A variant of Subject that "replays" old values to new subscribers by emitting them when they first subscribe. * We buffer the last emitted value and emit it to new subscribers if subscribed. */ private _accessToken$; private _user$; private accessTokenStream$; isLoading$: import("rxjs").Observable<boolean>; isAuthenticatedStream$: import("rxjs").Observable<boolean>; isAuthenticated$: import("rxjs").Observable<boolean>; private _userCache$; user$: import("rxjs").Observable<UserType | null>; accessToken$: import("rxjs").Observable<string | null>; constructor(kindeClient: KindeClient | null); setIsLoading(isLoading: boolean): void; setAccessToken(accessToken: string): void; setUser(user: UserType): void; static ɵfac: i0.ɵɵFactoryDeclaration<AuthStateService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<AuthStateService>; }