public async Task StoreAsync(PersistedGrant grant) { var userGrant = grant.ToGrant(); var userById = await _userManager.GetById(grant.SubjectId); if (userById != null) { userGrant.User = userById.ToReference(); } await _userGrantManager.Insert(userGrant); }