@factiii/auth 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,21 +8,16 @@ import {
8
8
  endAllSessionsSchema,
9
9
  getTwofaSecretSchema,
10
10
  loginSchema,
11
- logoutSchema,
12
11
  oAuthLoginSchema,
13
- otpLoginRequestSchema,
14
- otpLoginVerifySchema,
15
12
  registerPushTokenSchema,
16
13
  requestPasswordResetSchema,
17
- resendVerificationSchema,
18
14
  resetPasswordSchema,
19
15
  signupSchema,
20
16
  twoFaResetSchema,
21
17
  twoFaResetVerifySchema,
22
- twoFaSetupSchema,
23
18
  twoFaVerifySchema,
24
19
  verifyEmailSchema
25
- } from "./chunk-PYVDWODF.mjs";
20
+ } from "./chunk-EHI4P63M.mjs";
26
21
  export {
27
22
  biometricVerifySchema,
28
23
  changePasswordSchema,
@@ -33,18 +28,13 @@ export {
33
28
  endAllSessionsSchema,
34
29
  getTwofaSecretSchema,
35
30
  loginSchema,
36
- logoutSchema,
37
31
  oAuthLoginSchema,
38
- otpLoginRequestSchema,
39
- otpLoginVerifySchema,
40
32
  registerPushTokenSchema,
41
33
  requestPasswordResetSchema,
42
- resendVerificationSchema,
43
34
  resetPasswordSchema,
44
35
  signupSchema,
45
36
  twoFaResetSchema,
46
37
  twoFaResetVerifySchema,
47
- twoFaSetupSchema,
48
38
  twoFaVerifySchema,
49
39
  verifyEmailSchema
50
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factiii/auth",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -59,7 +59,7 @@ model User {
59
59
  // Relations
60
60
  sessions Session[]
61
61
  passwordReset PasswordReset[]
62
- otpsForLogin OTPBasedLogin[]
62
+ otps OTP[]
63
63
  devices Device[] @relation("devices")
64
64
  admin Admin?
65
65
  }
@@ -69,18 +69,17 @@ model User {
69
69
  // ==============================================================================
70
70
 
71
71
  model Session {
72
- id Int @id @default(autoincrement())
73
- socketId String? @unique
74
- twoFaSecret String? @unique
75
- refreshToken String? @unique
76
- issuedAt DateTime @default(now())
77
- browserName String @default("Unknown")
78
- lastUsed DateTime @default(now()) @updatedAt
79
- device Device? @relation(fields: [deviceId], references: [id])
80
- deviceId Int?
81
- userId Int
82
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
83
- revokedAt DateTime?
72
+ id Int @id @default(autoincrement())
73
+ socketId String? @unique
74
+ twoFaSecret String? @unique
75
+ issuedAt DateTime @default(now())
76
+ browserName String @default("Unknown")
77
+ lastUsed DateTime @default(now()) @updatedAt
78
+ device Device? @relation(fields: [deviceId], references: [id])
79
+ deviceId Int?
80
+ userId Int
81
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
82
+ revokedAt DateTime?
84
83
 
85
84
  @@index([userId])
86
85
  @@index([deviceId])
@@ -113,16 +112,15 @@ model PasswordReset {
113
112
  }
114
113
 
115
114
  // ==============================================================================
116
- // OTPBasedLogin Model
115
+ // OTP Model
117
116
  // ==============================================================================
118
117
 
119
- model OTPBasedLogin {
120
- id Int @id @default(autoincrement())
118
+ model OTP {
121
119
  code Int
122
- userId Int
120
+ expiredAt DateTime
121
+ userId Int @unique
123
122
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
124
- createdAt DateTime @default(now())
125
- disabled Boolean @default(false)
123
+
126
124
  }
127
125
 
128
126
  // ==============================================================================