diff --git a/src/Helpers/CoreTokenStorage.php b/src/Helpers/CoreTokenStorage.php index bb8e8f3..0d0cb6b 100644 --- a/src/Helpers/CoreTokenStorage.php +++ b/src/Helpers/CoreTokenStorage.php @@ -85,7 +85,7 @@ private static function getBaseUrlFromToken(string $token): ?string { $arToken = explode('.', $token); - return json_decode(base64_decode($arToken[2]), true, 512, JSON_THROW_ON_ERROR)['endpoint'] ?? null; + return json_decode(base64_decode(count($arToken) - 1), true, 512, JSON_THROW_ON_ERROR)['endpoint'] ?? null; } /**