nuxt-surrealdb
Version:
A Nuxt module aimed to simplify the use of SurrealDB
17 lines (16 loc) • 850 B
TypeScript
import type { DatabasePresetKeys, UserSession } from '#surrealdb/types/index';
export declare function useSurrealAuth(database?: DatabasePresetKeys): {
getSessionExp: (authToken?: string) => Promise<any>;
isAuthenticated: import("vue").ComputedRef<boolean>;
invalidate: (authToken?: string) => Promise<void>;
reAuthenticate: () => Promise<void>;
session: import("vue").Ref<UserSession, UserSession>;
signin: (credentials: Record<string, any>, o?: {
admin?: boolean;
}) => Promise<void>;
signout: (authToken?: string) => Promise<void>;
signup: (credentials: Record<string, any>) => Promise<void>;
token: import("nuxt/app").CookieRef<string | null | undefined>;
refreshInfo: (authToken?: string) => Promise<void>;
user: import("vue").ComputedRef<import("#surrealdb/types/index").User | null>;
};