Add ss 020
This commit is contained in:
parent
8d1c19e5b0
commit
87c325a363
@ -65,7 +65,7 @@ export async function POST(req : Request)
|
||||
$set: {
|
||||
"token" : {
|
||||
value: authToken,
|
||||
expiresAt: Math.floor(Date.now() / 1000) + 3 * 60 * 60,
|
||||
expiresAt: Math.floor(Date.now() / 1000) + 30 * 60 * 60,
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -138,7 +138,7 @@ export async function GET(req: Request)
|
||||
}
|
||||
// if the authToken if valid we check if it expired or not yet
|
||||
// we throw error if expired
|
||||
if(userDoc.token.expiresAt < (Date.now() / 1000))
|
||||
if(userDoc.token.expiresAt < (Date.now() / 1000)) //1000 for 3 hours
|
||||
{
|
||||
console.log('SERVER ::: token expired')
|
||||
throw {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user