mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
13 lines
390 B
TypeScript
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
|
||
|
}
|