Skip to content

Commit de1f2ad

Browse files
committed
wip
1 parent 5af9f2c commit de1f2ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/WorkOS.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public static function configure(): void
3434
*/
3535
public static function ensureAccessTokenIsValid(string $accessToken, string $refreshToken): array
3636
{
37+
static::configure();
38+
3739
$workOsSession = static::decodeAccessToken($accessToken);
3840

3941
if (! $workOsSession) {
@@ -58,6 +60,8 @@ public static function ensureAccessTokenIsValid(string $accessToken, string $ref
5860
*/
5961
public static function decodeAccessToken(string $accessToken): array|bool
6062
{
63+
static::configure();
64+
6165
try {
6266
return (array) JWT::decode($accessToken, JWK::parseKeySet(static::getJwk()));
6367
} catch (Throwable $e) {

0 commit comments

Comments
 (0)