0
xumx created
On my mobile app, I've stored the Cookie and it works fine.
However, some users start to get ("unAuthorizedRequest": true) "No user logged in!" Error. seems like AbpSession.UserId has no value anymore.
I'm trying to figure out what is the root cause. Will cookies or auth token invalidate on server reboot? or after a number of days? Where can I configure the expiry period.
3 Answer(s)
-
0
Ok I think I've found the config code for API token.
AccountController : AbpApiController
var currentUtc = new SystemClock().UtcNow; ticket.Properties.IssuedUtc = currentUtc; ticket.Properties.ExpiresUtc = currentUtc.Add(TimeSpan.FromMinutes(30));
Still looking for the cookie expiry
-
0
I guess I just have to set 'IsPersistent' to true
AuthenticationManager.SignIn(new AuthenticationProperties { IsPersistent = rememberMe }, identity);
-
0
Yes, you found it. AuthenticationProperties has also ExpiresUtc property if you need.