<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>token on seth-shi</title><link>https://sethix.com/tags/token/</link><description>Recent content in token on seth-shi</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 24 Jun 2018 12:04:42 +0800</lastBuildDate><atom:link href="https://sethix.com/tags/token/index.xml" rel="self" type="application/rss+xml"/><item><title>A Pitfall When Developing Optional Token-Passing API Interfaces</title><link>https://sethix.com/posts/2018062412/</link><pubDate>Sun, 24 Jun 2018 12:04:42 +0800</pubDate><guid>https://sethix.com/posts/2018062412/</guid><description>When developing APIs, authentication is inevitable. I use jwt-auth for this purpose. A common issue in authentication is token expiration. In the default settings of config/jwt.php, the expiration time is one hour. For better security, I&amp;rsquo;ve set it to 5 minutes. Forcing users to re-login every 5 minutes would lead to terrible user experience. This is where token refresh functionality becomes essential. Normally, we create a dedicated token refresh endpoint.</description></item></channel></rss>