change session length dynamically by role in asp.net core razor pages

33 Views Asked by At

I need to give different session length to users according to a certain role. Since session length is configured in program.cs I tried to check the role in it. The problem that in order to us IsInRole(...) function I need to know who is the current user which I don't. Is it possible to do it like that? Any other way to do it?

0

There are 0 best solutions below