add staging key

Signed-off-by: Maurice Preuß <hello@envoyr.com>
This commit is contained in:
2025-09-18 19:17:50 +00:00
parent 0f14fa1b4c
commit 5ab57dcdfe
4 changed files with 31 additions and 5 deletions

View File

@@ -2,6 +2,7 @@
namespace Anikeen\Id\Helpers;
use Anikeen\Id\AnikeenId;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use Illuminate\Auth\AuthenticationException;
@@ -30,6 +31,8 @@ class JwtParser
private function getOauthPublicKey(): bool|string
{
return file_get_contents(dirname(__DIR__, 3) . '/oauth-public.key');
return AnikeenId::getMode() === 'staging'
? file_get_contents(dirname(__DIR__, 3) . '/oauth-public.staging.key')
: file_get_contents(dirname(__DIR__, 3) . '/oauth-public.key');
}
}