Skip to content

Commit

Permalink
set expiration on redis set facade properly
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Jan 19, 2024
1 parent d57d0ba commit a6acbc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Controllers/Internal/v1/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a6acbc0

Please sign in to comment.