This repository has been archived on 2024-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
p61-project/domain/repositories/Authentication.ts

13 lines
390 B
TypeScript

import type { User, UserLoginData, UserRegisterData } from "../entities/User"
export interface AuthenticationRepository {
register: (data: UserRegisterData) => Promise<User>
login: (data: UserLoginData) => Promise<User>
logout: () => Promise<void>
getUser: () => Promise<User | null>
onUserStateChange: (
callback: (user: User | null) => void | Promise<void>,
) => void
}