Skip to content

Commit f0f7355

Browse files
committed
fix: translate non-numeric lifetimes
1 parent cafd615 commit f0f7355

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Auth/User.php

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ public function __construct($data)
7171
}
7272
}
7373

74+
$sessionLifetime = !is_numeric($sessionLifetime)
75+
? strtotime($sessionLifetime)
76+
: (time() + $sessionLifetime);
77+
7478
$this->tokens['access'] = $this->generateToken($sessionLifetime);
7579
$this->tokens['refresh'] = $this->generateToken($sessionLifetime + 259200);
7680
}

0 commit comments

Comments
 (0)