mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 22:51:13 -05:00
feat: Implement identity management and safety checks
This commit is contained in:
33
src/types/identity.ts
Normal file
33
src/types/identity.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Type definitions for user identity and OAuth provider management
|
||||
*/
|
||||
|
||||
export interface UserIdentity {
|
||||
id: string;
|
||||
user_id: string;
|
||||
identity_data: {
|
||||
email?: string;
|
||||
full_name?: string;
|
||||
avatar_url?: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
provider: 'google' | 'discord' | 'email' | 'github' | string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
last_sign_in_at: string;
|
||||
}
|
||||
|
||||
export type OAuthProvider = 'google' | 'discord';
|
||||
|
||||
export interface IdentitySafetyCheck {
|
||||
canDisconnect: boolean;
|
||||
reason?: 'last_identity' | 'no_password_backup' | 'safe';
|
||||
hasPasswordAuth: boolean;
|
||||
totalIdentities: number;
|
||||
oauthIdentities: number;
|
||||
}
|
||||
|
||||
export interface IdentityOperationResult {
|
||||
success: boolean;
|
||||
error?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user