wip
This commit is contained in:
@@ -4,8 +4,25 @@ import type { AuthSessionDTO } from '@gridpilot/identity/application/dto/AuthSes
|
||||
export type AuthUser = AuthenticatedUserDTO;
|
||||
export type AuthSession = AuthSessionDTO;
|
||||
|
||||
export interface SignupParams {
|
||||
email: string;
|
||||
password: string;
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
export interface LoginParams {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface AuthService {
|
||||
getCurrentSession(): Promise<AuthSession | null>;
|
||||
|
||||
// Email/password authentication
|
||||
signupWithEmail(params: SignupParams): Promise<AuthSession>;
|
||||
loginWithEmail(params: LoginParams): Promise<AuthSession>;
|
||||
|
||||
// iRacing OAuth (demo)
|
||||
startIracingAuthRedirect(
|
||||
returnTo?: string,
|
||||
): Promise<{ redirectUrl: string; state: string }>;
|
||||
@@ -14,5 +31,6 @@ export interface AuthService {
|
||||
state: string;
|
||||
returnTo?: string;
|
||||
}): Promise<AuthSession>;
|
||||
|
||||
logout(): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user