mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-30 10:56:31 -05:00
fix: deleteUser check session freshAge using ms instead of sec (#3020)
This commit is contained in:
@@ -512,7 +512,7 @@ export const deleteUser = createAuthEndpoint(
|
||||
const currentAge = session.session.createdAt.getTime();
|
||||
const freshAge = ctx.context.options.session.freshAge;
|
||||
const now = Date.now();
|
||||
if (now - currentAge > freshAge) {
|
||||
if (now - currentAge > freshAge * 1000) {
|
||||
throw new APIError("BAD_REQUEST", {
|
||||
message: BASE_ERROR_CODES.SESSION_EXPIRED,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user