export interface SignUpWithEmailAndPasswordProps { email: string; password: string; name?: string; username?: string; avatar?: string; bio?: string; location?: { latitude: number; longitude: number; }; birthdate?: Date; metadata?: Record; secureMetadata?: Record; avatarFile?: File | Blob; avatarOptions?: any; bannerFile?: File | Blob; bannerOptions?: any; } export interface SignInWithEmailAndPasswordProps { email: string; password: string; } export interface ChangePasswordProps { password: string; newPassword: string; } export interface SetPasswordProps { newPassword: string; } export interface UseAuthValues { initialized: boolean; accessToken: string | null; refreshToken: string | null; setRefreshToken: React.Dispatch>; signUpWithEmailAndPassword: (props: SignUpWithEmailAndPasswordProps) => Promise; signInWithEmailAndPassword: (props: SignInWithEmailAndPasswordProps) => Promise; signOut: () => Promise; changePassword: (props: ChangePasswordProps) => Promise; setPassword: (props: SetPasswordProps) => Promise; /** * Rotates the stored refresh token and resolves with the new access token. * * Always resolves a token or THROWS — including when no project is * configured, which every other action on this hook already treats as a * thrown error. It used to resolve `undefined` there while every genuine * failure threw, so the one value the type still advertised was * indistinguishable from a call that simply had nothing to do. */ requestNewAccessToken: () => Promise; } export default function useAuth(): UseAuthValues;