Hello, I am trying to reduce duration for which website remembers a user. Currently its set for ever we want to limit it to 1 hour, how can we do it. We tried this approach but didn't work. We tried to configure the authentication cookie in our host module. context.Services.ConfigureApplicationCookie(options => { options.ExpireTimeSpan = TimeSpan.FromSeconds(120); // Set the expiration time to 5 minutes options.SlidingExpiration = false; }); Can you please help me with this.
30 Answer(s)
-
0
Angular will auto login and get access token if API website has a user state. Then angular will use the access token to get data from API website.
Do you wan to clear access token from angular when the browser exit?
-
0
As per your statement front end uses Access token and backend uses cookies now when we have set the duration of cookies to expire in 10 minutes then after 10 minutes when front end will ask api to give data then Cookie is expired then backend should redirect use to Login page. right so why its not happening then. Also we have disabled offline from scopes to be able to stop refresh tokens being generated by api. We will create new ticket for angular but upon cookie expiry uses should be redirected to login. let us know if we are wrong here and whats expected behaviour in this case.
-
0
hi
Please set cookies and access token to 10 minutes, I will test it online again.
-
0
hello, Added please check.
-
0