Class BackchannelOidcClient

Assembly: redb.Identity.Web.dll

BFF-side OIDC client that drives the entire authorization-code + PKCE flow against
the Identity host using a server-side . The browser never
touches the host directly — only the BFF does.
Sequence:

Generate PKCE verifier/challenge, state, nonce.
POST host /login with username/password — receive session cookie.
GET host /connect/authorize carrying that cookie — receive 302 with ?code=....
POST host /connect/token with code + verifier — receive tokens.
Validate id_token, fetch userinfo, build ClaimsPrincipal.

public sealed class BackchannelOidcClient

Inheritance

Object→BackchannelOidcClient

Methods

LoginAsync(string, string, CancellationToken)

public Task<BackchannelLoginResult> LoginAsync(string username, string password, CancellationToken ct = default)

RecordConsentGrantAsync(ConsentInFlightState, CancellationToken)

Posts the user's allow-consent decision to the host's session-based form

public Task<bool> RecordConsentGrantAsync(ConsentInFlightState inflight, CancellationToken ct = default)

ResumeAfterConsentAsync(ConsentInFlightState, CancellationToken)

Resumes a login flow that was paused on the BFF-native consent UI. The end-user

public Task<BackchannelLoginResult> ResumeAfterConsentAsync(ConsentInFlightState inflight, CancellationToken ct = default)

VerifyDeviceCodeAsync(string, string, string, CancellationToken)

BFF-relayed end-user verification for the OAuth 2.0 Device Authorization Grant

public Task<DeviceVerifyResult> VerifyDeviceCodeAsync(string userCode, string action, string accessToken, CancellationToken ct = default)

VerifyMfaAsync(MfaInFlightState, string, CancellationToken)

Resumes a login flow that was paused on MFA. Posts the user's TOTP/recovery code

public Task<BackchannelLoginResult> VerifyMfaAsync(MfaInFlightState inflight, string code, CancellationToken ct = default)

Constructors