<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How should I validate access tokens?]]></title><description><![CDATA[<p dir="auto">If I understand it correctly, there are 2 approaches:</p>
<ol>
<li>Simply verify the <code>accessToken</code> on every request i.e. check signature, expiration etc, but don't verify with the FusionAuth server.</li>
<li>Verify the <code>accessToken</code> by calling <code>/introspect</code> endpoint.</li>
</ol>
<p dir="auto">What are pros and cons of these different approaches?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/49/how-should-i-validate-access-tokens</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 23:56:46 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/49.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 May 2020 22:35:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How should I validate access tokens? on Mon, 04 May 2020 22:39:09 GMT]]></title><description><![CDATA[<p dir="auto">There are a few things to consider.</p>
<ul>
<li>how long tokens live for</li>
<li>what happens if permisssion are modified in FusionAuth but the protected resource still allows access?</li>
<li>any performance worries due to a large number of <code>accessToken</code> validation calls being made by the protected resource.</li>
</ul>
<p dir="auto">With the first approach (validating the access token without communicating with FusionAuth) the holder of the token will be able to access your API as long as the token is valid (unless the API server communicates periodically with FusionAuth to check the validity). In addition, changes to user privileges won't take place until the JWT expires and the client retrieves a new access token using the refresh token.</p>
<p dir="auto">With the second approach, if a token is revoked in FusionAuth (if for instance the user is disabled) the access is cut off immediately. The cost is that you're making an additional network call every time, which has a performance impact. Note that if you could use the <code>userinfo</code> endpoint instead of the token if you want updated user claims. The <code>token</code> endpoint isn't going to give you that information, just a yes/no depending on if the token is valid.</p>
<p dir="auto">So it's hard to make a recommendation without knowing what the consequences of unauthorized access to your API or protected resource would be. It also would be helpful to know the expected traffic; if it is expected to be low, the performance impact of the second approach will be minimal.</p>
]]></description><link>https://fusionauth.io/community/forum/post/109</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/109</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Mon, 04 May 2020 22:39:09 GMT</pubDate></item></channel></rss>