Interface IFederatedAuthProvider
SPI for redirect-based federated authentication (OIDC, SAML, etc.).
Unlike (password-based, synchronous),
federation uses a two-step redirect flow: challenge → callback.
public interface IFederatedAuthProvider
Properties
ProviderId
Provider ID used as key in ExternalIdentities dict. E.g. "google", "azure-ad".
string ProviderId { get; }
Methods
CreateChallengeAsync(string, string, CancellationToken)
Build authorization redirect URI with state, nonce, PKCE.
Task<FederationChallenge> CreateChallengeAsync(string callbackUrl, string returnUrl, CancellationToken ct = default)
HandleCallbackAsync(string, string, string?, string?, CancellationToken)
Handle callback: exchange code → validate tokens → return identity.
Task<ExternalAuthResult> HandleCallbackAsync(string code, string callbackUrl, string? codeVerifier = null, string? nonce = null, CancellationToken ct = default)