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
keystringThe pending state key.
cancellationTokenCancellationTokenA 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.