@adonis-agora/authkit-react
Version:
Frontend ergonomics over AuthKit for AdonisJS + Inertia + React apps: a typed useAuth() hook, role-gating hooks and gating components.
12 lines (11 loc) • 518 B
TypeScript
export type PasswordStrengthScore = 0 | 1 | 2 | 3 | 4;
export interface PasswordStrengthResult {
score: PasswordStrengthScore;
feedback?: string[];
}
export type PasswordScorer = (password: string) => PasswordStrengthResult;
export interface UsePasswordStrengthOptions {
scorer?: PasswordScorer;
}
export declare function heuristicScorer(password: string): PasswordStrengthResult;
export declare function usePasswordStrength(password: string, options?: UsePasswordStrengthOptions): PasswordStrengthResult;