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\Socialite;
use Anikeen\Id\AnikeenId;
use Anikeen\Id\Enums\Scope;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Http\Request;
@@ -32,9 +33,7 @@ class Provider extends AbstractProvider implements ProviderInterface
*/
protected function getBaseUrl(): string
{
$mode = config('services.anikeen.mode') ?? 'production';
return $mode === 'staging'
return AnikeenId::getMode() === 'staging'
? 'https://staging.id.anikeen.com'
: 'https://id.anikeen.com';
}