/// <summary> /// The Jwt implementation does not support "revoke OAuth token" (logout) by design. /// Delete the user's tokens from the database (revoke its bearer token) /// </summary> public async Task SignOutAsync() { await _token.InvalidateTokensAsync(_session.UserId); //TODO: Remove this line if you don't store jwt in cookie _antiXsrf.RemoveToken(); }
public async Task SignOutAsync() { _logger.LogInformation($"{_session.UserName} logged out."); await _httpContext.HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); _antiXsrf.RemoveToken(); }
/// <summary> /// The Jwt implementation does not support "revoke OAuth token" (logout) by design. /// Delete the user's tokens from the database (revoke its bearer token) /// </summary> public async Task SignOutAsync() { await _token.RevokeTokensAsync(_session.UserId.FromString <long>()); _antiforgery.RemoveToken(); }