- When you do log in, send 2 tokens (Access token, Refresh token) in response to the client.
- The access token will have less expiry time and Refresh will have long expiry time.
- The client (Front end) will store refresh token in his local storage and access token in cookies.
- The client will use an access token for calling APIs. But when it expires, pick the refresh token from local storage and call auth server API to get the new token.
- Your auth server will have an API exposed which will accept refresh token and checks for its validity and return a new access token.
- Once the refresh token is expired, the User will be logged out.
jwt 续期问题 2021-06-08
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- =========================================================...
- Different Components NodeManager The NodeManager is YARN‘...
- Huang Hong Qing497915580atqq.com Keywords: JWT security,J...
- springboot配置选项(二) SOLR (SolrProperties) spring.data.solr....