UNPKG

alinea

Version:
20 lines (19 loc) 446 B
import type { User } from 'alinea/core/User'; export declare enum AuthResultType { Authenticated = 0, UnAuthenticated = 1, MissingApiKey = 2, NeedsRefresh = 3 } export type AuthResult = { type: AuthResultType.Authenticated; user: User; } | { type: AuthResultType.UnAuthenticated; redirect: string; } | { type: AuthResultType.MissingApiKey; setupUrl: string; } | { type: AuthResultType.NeedsRefresh; };