From a6acbc0a2e241c38432486b9a7b8957bfcde8f9d Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Fri, 19 Jan 2024 16:58:30 +0800 Subject: [PATCH] set expiration on redis set facade properly --- src/Http/Controllers/Internal/v1/AuthController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/Controllers/Internal/v1/AuthController.php b/src/Http/Controllers/Internal/v1/AuthController.php index 2f90d3c..fbebf61 100644 --- a/src/Http/Controllers/Internal/v1/AuthController.php +++ b/src/Http/Controllers/Internal/v1/AuthController.php @@ -210,7 +210,8 @@ public function createVerificationSession(Request $request) $verificationSessionToken = base64_encode($email . '|' . $token); // Store in redis - Redis::set($token, $verificationSessionToken, Carbon::now()->addMinutes(5)); + $expirationTime = Carbon::now()->addMinutes(5)->timestamp; + Redis::set($token, $verificationSessionToken, 'EX', $expirationTime); // If opted to send verification token along with session if ($send) {