<?php

declare(strict_types=1);

namespace App\Services\Auth\Oauth;

interface OauthProviderInterface
{
    public function provider(): string;

    public function authorizationUrl(string $state, ?string $nonce = null, ?string $redirectUri = null): string;

    /**
     * Exchange code + return normalized profile:
     *   ['id' => string, 'email' => string, 'name' => string|null, 'raw' => array]
     */
    public function exchange(string $code, ?string $redirectUri = null): array;

    public function isMock(): bool;
}
