0
vnetonline created
Dear Halil
I am planning to use aspnetzero as the backend for my ionic 2 mobile application and was wondering how long does the token last (i.e. Number of minutes in which it expires which) I get from /api/account/authenticate ... also is there a function to refresh if it is about to expire ??
1 Answer(s)
-
0
Hi,
Currently it is 30 minutes but you can set it like this if your version of AspNet Zero does not have it already.
var currentUtc = new SystemClock().UtcNow; ticket.Properties.IssuedUtc = currentUtc; ticket.Properties.ExpiresUtc = currentUtc.Add(TimeSpan.FromMinutes(30));
There is no function to refresh it right now. You can request a new token using /api/account/authenticate when you get a 401 error.