public async Task GetProfileDataAsync(ProfileDataRequestContext context) { var sub = context.Subject.Identity.GetSubjectId(); var user = await _userManager.FindByIdAsync(sub); var principal = await _claimsFactory.CreateAsync(user); var userInfo = _regHelper.GetUserInfo(user.Id); var claims = principal.Claims.ToList(); claims = claims.Where(claim => context.RequestedClaimTypes.Contains(claim.Type)).ToList(); // Add custom claims in token here based on user properties or any other source claims.Add(new Claim("is_active", user.IsActive.ToString() ?? "false")); claims.Add(new Claim("gender", userInfo.Gender.ToString())); claims.Add(new Claim("dob", userInfo.DOB.ToString())); context.IssuedClaims = claims; }