I am using the IdentityServer and I have a React client. so when I try to login into my client after checking credentials IDP generates some cookies in my browser. I read about these cookies (especially.AspNetCore.Identity.Application cookie) and discovered that some user information is stored in these cookies such as claims and roles. So I want to customize the cookie generator and remove some useless information from there. there are two questions:
1- how can I substitute the default cookie generator with a customized one?
2- are claims and roles needed for any other flows or I can remove the without any concerns?