namespace Cleanuparr.Infrastructure.Features.Auth;
public interface IOidcAuthService
{
///
/// Generates the OIDC authorization URL and stores state/verifier for the callback.
///
/// The callback URI for the OIDC provider.
/// Optional user ID of the authenticated user initiating the flow (for account linking).
Task StartAuthorization(string redirectUri, string? initiatorUserId = null);
///
/// Handles the OIDC callback: validates state, exchanges code for tokens, validates the ID token.
///
Task HandleCallback(string code, string state, string redirectUri);
///
/// Stores tokens associated with a one-time exchange code.
/// Returns the one-time code.
///
string StoreOneTimeCode(string accessToken, string refreshToken, int expiresIn);
///
/// Exchanges a one-time code for the stored tokens.
/// The code is consumed (can only be used once).
///
OidcTokenExchangeResult? ExchangeOneTimeCode(string code);
}