Login

This commit is contained in:
2025-09-20 02:13:02 +08:00
parent 48a9a97e18
commit e9c7559e38
15 changed files with 855 additions and 30 deletions

65
app/types/api/geo.ts Normal file
View File

@@ -0,0 +1,65 @@
export interface GeoIpLocation {
latitude: number | null
longitude: number | null
countryCode: string | null
country: string | null
city: string | null
}
export interface SnAuthChallenge {
id: string
expiredAt: string | null
stepRemain: number
stepTotal: number
failedAttempts: number
type: number
blacklistFactors: string[]
audiences: unknown[]
scopes: unknown[]
ipAddress: string
userAgent: string
nonce: string | null
location: GeoIpLocation | null
accountId: string
createdAt: string
updatedAt: string
deletedAt: string | null
}
export interface SnAuthSession {
id: string
label: string | null
lastGrantedAt: string
expiredAt: string | null
accountId: string
challengeId: string
challenge: SnAuthChallenge
createdAt: string
updatedAt: string
deletedAt: string | null
}
export interface SnAuthFactor {
id: string
type: number
contact?: string | null
createdAt: string
updatedAt: string
deletedAt: string | null
expiredAt: string | null
enabledAt: string | null
trustworthy: number
createdResponse: Record<string, unknown> | null
}
export interface SnAccountConnection {
id: string
accountId: string
provider: string
providedIdentifier: string
meta: Record<string, unknown>
lastUsedAt: string
createdAt: string
updatedAt: string
deletedAt: string | null
}

View File

@@ -4,3 +4,4 @@ export type { SnVerification, SnPublisher } from './publisher'
export type { SnActivity } from './activity'
export type { SnVersion } from './version'
export type { SnAccountLink, SnAccountBadge, SnAccountPerkSubscription, SnAccountProfile, SnAccount } from './user'
export type { GeoIpLocation, SnAuthChallenge, SnAuthSession, SnAuthFactor, SnAccountConnection } from './geo'