ReviewOS

also looking at this

loghqorg/loghq

Deploy: uniform auth session model (main → production)

#7
Merged glennmichael123 wants to merge main into production
282 files +3028 -64856

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

app/Actions/Auth/VerifyTwoFactorLoginAction.tsmodified+3-3
Changes to app/Actions/Auth/VerifyTwoFactorLoginAction.ts
@@ -38,11 +38,11 @@ export default new Action({
3838 // wrong) must start over from LoginAction, not retry.
3939 const userId = await consumeTwoFactorChallenge(challengeToken)
4040 if (!userId)
41 return response.unauthorized('This login attempt has expired — please sign in again.')
41 return response.unauthorized('This login attempt has expired - please sign in again.')
4242
4343 const valid = await verifyTwoFactorLoginCode(userId, code)
4444 if (!valid)
45 return response.unauthorized('Invalid code — please sign in again.')
45 return response.unauthorized('Invalid code - please sign in again.')
4646
4747 // Carry the "remember me" tier chosen on step one through to the session
4848 // issued here, so a 2FA account is not silently downgraded to the baseline
@@ -50,7 +50,7 @@ export default new Action({
5050 const expiresInMinutes = sessionExpiryMinutes(request.get('remember'))
5151 const result = await Auth.loginUsingId(userId, { expiresInMinutes })
5252 if (!result)
53 return response.unauthorized('Invalid code — please sign in again.')
53 return response.unauthorized('Invalid code - please sign in again.')
5454
5555 const user = result.user
5656
resources/views/login.stxmodified+1-1
Changes to resources/views/login.stx
@@ -109,7 +109,7 @@ async function onVerify(e: Event): Promise<void> {
109109 return
110110 }
111111 // Challenge tokens are single-use; send a failed attempt back to step one.
112 error.set((r.data && (r.data.message || r.data.error)) || 'Invalid code — please sign in again.')
112 error.set((r.data && (r.data.message || r.data.error)) || 'Invalid code - please sign in again.')
113113 code.set('')
114114 mode.set('credentials')
115115 }