Table of Contents
API reference

Method ConsumeAsync

Namespace
DisCatSharp.Hosting.AspNetCore.Ingress
Assembly
DisCatSharp.Hosting.AspNetCore.dll

ConsumeAsync(string, CancellationToken)

Resolves and removes an existing pending state entry.

public ValueTask<DiscordIngressPendingState?> ConsumeAsync(string key, CancellationToken cancellationToken = default)

Parameters

key string

The pending state key.

cancellationToken CancellationToken

A token used to cancel the operation.

Returns

ValueTask<DiscordIngressPendingState>

The removed pending state entry, or null when none is available.

Remarks

OAuth callback handling uses this operation so the same state cannot be accepted twice.