Some preliminary knowledge of the time format of JWT
Convert to time can use JS,
New Date (1531841745*1000)
==>tue Jul 2018 23:35:45 gmt+0800 (China Standard Time)
About Refresh Token
Refreshtoken only supports in three modes of hybrid, authorization and Resourceownpassword
Usually in Identityserver,
If the client is a. NET program, we use hybrid and Resourceownpassword authorization
If the client is a pure JS program, then use implicit authorization.
Need to add offline_access scope permission
How to understand Offline_access
Reference https://stackoverflow.com/questions/42162769/identity-server-4-angular-2-token-expiration
5down voteaccepted
I can recommend the library for managing tokens for the JavaScript Application:https://github.com/identitymodel/oidc-clien T-js
You ' ve correctly used the implicit flow for spa-here are the description about which flow are right One-https://leastpri vilege.com/2016/01/17/which-openid-connectoauth-2-o-flow-is-the-right-one/
Oidc-client
Provides great feature called automaticSilentRenew
-check the docs. There is the timer on the background and handle a event before token expiration and using hidden iframe for getting n EW access token. (It looks as if this JS framework will automatically use the IFRAME to IDSV the token when the authorization expires)
Example for Angular2
and oidc-client
: https://github.com/jmurphzyo/Angular2OidcClient
Video with overview for authentication and authorization in JavaScript Web applications using Identityserver-https://vim eo.com/131636653
In combat one, MVC client uses Resourceownpassword, how to manage Accesstoken renewals
Actual combat two, JS client renewal
Combat three, MVC client uses hybrid, how to manage renewals
Accesstoken renewal of each model