nuxt-users
Version:
A comprehensive user management module for Nuxt 3 and Nuxt 4 applications with authentication, authorization, database support, and CLI tools
26 lines (25 loc) • 913 B
TypeScript
import type { User, UserWithoutPassword } from '../../types.js';
export declare const useAuthentication: () => {
user: Readonly<import("vue").Ref<{
readonly id: number;
readonly email: string;
readonly name: string;
readonly role: string;
readonly created_at: string;
readonly updated_at: string;
readonly last_login_at?: string | undefined;
} | null, {
readonly id: number;
readonly email: string;
readonly name: string;
readonly role: string;
readonly created_at: string;
readonly updated_at: string;
readonly last_login_at?: string | undefined;
} | null>>;
isAuthenticated: import("vue").ComputedRef<boolean>;
login: (userData: User) => void;
logout: () => Promise<void>;
fetchUser: () => Promise<UserWithoutPassword | null>;
initializeUser: () => Promise<void>;
};