Method LogoutAsync(long, CancellationToken)

Assembly: redb.Identity.Core.dll

Signs the user out everywhere: every active session, every authorization and every valid token of
theirs is revoked, so nothing issued to the user keeps working. This is what a password change or
reset, an operator's logout, a SCIM deactivation and a user disable rely on.

Authorizations and tokens are written by the OpenIddict stores and keyed by the user's public
subject (value_guid), not by the internal user id the sessions carry in Key. Tokens
are revoked on their own, not only through their authorization: the password grant issues refresh
tokens with no authorization row, and a revoked authorization leaves an already issued access token
valid until it expires, while a revoked token entry is refused at introspection and on refresh.


Every revocation is flushed via batched SaveAsync(IEnumerable<...>) rather than per
row: a user with many consents and rotated refresh tokens would otherwise turn this into hundreds
of round-trips.

public Task<int> LogoutAsync(long userId, CancellationToken ct = default)