feat(packages): add standalone auth and payment
This commit is contained in:
19
packages/auth/src/ui/auth.models.ts
Normal file
19
packages/auth/src/ui/auth.models.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { AuthSession } from '../telegram/models/session.model';
|
||||
|
||||
export type AuthMode = 'customer' | 'admin';
|
||||
export type AuthMethod = 'qr' | 'credentials' | 'yandex';
|
||||
export interface CredentialLogin { login: string; password: string; }
|
||||
export interface AuthResult {
|
||||
method: AuthMethod;
|
||||
mode: AuthMode;
|
||||
session: AuthSession;
|
||||
accessToken?: string;
|
||||
refreshToken?: string;
|
||||
}
|
||||
export interface ExternalAuthStart { attemptId: string; authorizationUrl: string; }
|
||||
export interface AuthFailure {
|
||||
method: AuthMethod;
|
||||
code: 'configuration' | 'invalid_credentials' | 'backend' | 'popup_blocked' | 'expired';
|
||||
message: string;
|
||||
cause?: unknown;
|
||||
}
|
||||
Reference in New Issue
Block a user