How to add custom claims to access token in IdentityServer4? [closed]

You should implement your own ProfileService. Have a look in this post which I followed when I implemented the same: Extending Identity in IdentityServer4 to manage users in ASP.NET Core Here is an example of my own implementation: public class ProfileService : IProfileService { protected UserManager<ApplicationUser> _userManager; public ProfileService(UserManager<ApplicationUser> userManager) { _userManager = userManager; } public … Read more

IdentityServer4 register UserService and get users from database in asp.net core

Update – IdentityServer 4 has changed and replaced IUserService with IResourceOwnerPasswordValidator and IProfileService I used my UserRepository to get all the user data from the database. This is injected (DI) into the constructors, and defined in Startup.cs. I also created the following classes for identity server (which is also injected): First define ResourceOwnerPasswordValidator.cs: public class … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)