detect failed cookies
Massimo Melina committed
Apr 9, 2022 at 12:19 UTC
e3770c324898adaa1613db9ca9e0a83ad6fd694b
1 file changed
+2
server/src/api.auth.ts
+2
@@ -78,6 +78,8 @@ export const loginSrp1: ApiHandler = async ({ username }, ctx) => {
78
export const loginSrp2: ApiHandler = async ({ pubKey, proof }, ctx) => {
79
if (!ctx.session)
80
return new ApiError(500)
81
+ if (!ctx.session.login)
82
+ return new ApiError(409)
83
const { username, sid } = ctx.session.login
84
const step1 = ongoingLogins[sid]
85
try {