<?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[Issuing Signature failed tokens]]></title><description><![CDATA[<p dir="auto">Hi FusionAuth team, FA API has a weird behaviour when issuing JWT tokens.</p>
<p dir="auto">Error example:</p>
<pre><code>Firebase\JWT\SignatureInvalidException: Signature verification failed in /vendor/firebase/php-jwt/src/JWT.php:141
</code></pre>
<p dir="auto">The setup is working well, but from time to time FA can generate an invalid access token. It happened 5 times over the weekend - rarely, but it does.<br />
I use elliptic certificates, customers and guest JWT tokens and both were affected.<br />
For the customers - I use lambda to fill custom claims, but for the guest - I use vend endpoint - so it's not related to the way to issue it.<br />
Could you help me with it?<br />
The invalid guest token:</p>
<pre><code>eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Il9YZkZkRUlwN24yTEdkcVJjUGdtQVcxM1NMWSJ9.eyJleHAiOjE2ODgzNjg3ODEsImlhdCI6MTY1NjgxMTg0MSwianRpIjoiNGE1ODNjZDMtZDllZS00ZjExLWE3M2YtYTJkOTk5YzNmNzBkIiwiYXBwbGljYXRpb25JZCI6ImMyNDMyMWZhLTc5OTctNDRjMy04ZGVkLTI1MGEyMjNkNDQ5YSIsImN1c3RvbWVySWQiOjAsImN1c3RvbWVyR3JvdXBJZCI6MCwic3RvcmVUeXBlIjoxLCJmYVVzZXJJZCI6MCwic3RvcmVJZCI6MSwid2Vic2l0ZUlkIjoxLCJsb2NhbGUiOiJlbl9HQiJ9.AGwaLswrLuwvOHpwcf4ayrLp8OLBB2XLXSl05oKNpABGH7j4dRbOaRhmZD5vZm4eZxICWsaWCzSowNLzsLxL6g
</code></pre>
]]></description><link>https://fusionauth.io/community/forum/topic/2115/issuing-signature-failed-tokens</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Jul 2026 13:15:08 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/2115.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Jul 2022 16:18:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Issuing Signature failed tokens on Tue, 19 Jul 2022 14:36:07 GMT]]></title><description><![CDATA[<p dir="auto">Created the github issue - <a href="https://github.com/FusionAuth/fusionauth-issues/issues/1795" rel="nofollow ugc">https://github.com/FusionAuth/fusionauth-issues/issues/1795</a></p>
]]></description><link>https://fusionauth.io/community/forum/post/5321</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5321</guid><dc:creator><![CDATA[aleksandr.vits-rimer]]></dc:creator><pubDate>Tue, 19 Jul 2022 14:36:07 GMT</pubDate></item><item><title><![CDATA[Reply to Issuing Signature failed tokens on Thu, 07 Jul 2022 15:12:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/1793">@aleksandr-vits-rimer</a></p>
<p dir="auto">Ah, if you can replicate it across environments and languages, it may be some kind of bug. (Latest version is 1.36.8 but I don't see any issues in the release notes that would have affected this.)</p>
<p dir="auto">It would be great if you could write up reproduction steps and file an issue here so we can take a look:</p>
<p dir="auto"><a href="https://github.com/FusionAuth/fusionauth-issues/issues/new?assignees=&amp;labels=&amp;template=bug_report.md" rel="nofollow ugc">https://github.com/FusionAuth/fusionauth-issues/issues/new?assignees=&amp;labels=&amp;template=bug_report.md</a></p>
<p dir="auto">Feel free to reference this forum post in the "additional context" section. And if you can provide a sample script, that would be helpful.</p>
<blockquote>
<p dir="auto">I noticed it happening spikely and probably related to the same spikes on the ES cluster. Is it possible that issuing the new jwt depends on ES health?</p>
</blockquote>
<p dir="auto">I don't think so, but if your machine is starved of resources due to a spike, it may be the request for the public keys endpoint is not returning in the appropriate expected timeframe, causing the validation to fail. Usually libraries cache this JWKS value, or you can use a HTTP proxy in front of FusionAuth to cache the JWKS values for ~5 minutes.</p>
<p dir="auto">(Also, I voted up your post, so future posts from you won't be moderated.)</p>
]]></description><link>https://fusionauth.io/community/forum/post/5297</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5297</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Thu, 07 Jul 2022 15:12:30 GMT</pubDate></item><item><title><![CDATA[Reply to Issuing Signature failed tokens on Thu, 07 Jul 2022 12:26:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/20">@dan</a> the version - v1.36.7</p>
]]></description><link>https://fusionauth.io/community/forum/post/5296</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5296</guid><dc:creator><![CDATA[aleksandr.vits-rimer]]></dc:creator><pubDate>Thu, 07 Jul 2022 12:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to Issuing Signature failed tokens on Thu, 07 Jul 2022 15:07:11 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your answer. The jwt token validation is unrelated to the library because I have the same behaviour on the python validator on the different microservice. (I checked signature failed on 3 different environments, including manual checking on my local machine)<br />
I noticed it happening spikely and probably related to the same spikes on the ES cluster. Is it possible that issuing the new jwt depends on ES health?<br />
I see GC problems at the same time on my ES cluster and that is why I'm asking.<br />
This is a public key (better to remove it before publishing if it is possible)</p>
<pre><code>(removed)
</code></pre>
]]></description><link>https://fusionauth.io/community/forum/post/5295</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5295</guid><dc:creator><![CDATA[aleksandr.vits-rimer]]></dc:creator><pubDate>Thu, 07 Jul 2022 15:07:11 GMT</pubDate></item><item><title><![CDATA[Reply to Issuing Signature failed tokens on Thu, 07 Jul 2022 10:54:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/1793">@aleksandr-vits-rimer</a></p>
<p dir="auto">Hiya,</p>
<p dir="auto">This is not an issue I've seen before. Would need a bit more info to help you troubleshoot.</p>
<p dir="auto">What version of FusionAuth are you running?</p>
<p dir="auto">Are there common claims, keys, or other similarities for the tokens that are failing to be verified?</p>
<p dir="auto">Verification depends on the library you are using with php-jwt. Which library are you using? It looks like you should be using openSSL, based on the header for the token you provided (which is using <code>ES256</code> for the <code>alg</code>) and this line: <a href="https://github.com/firebase/php-jwt/blob/main/src/JWT.php#L57" rel="nofollow ugc">https://github.com/firebase/php-jwt/blob/main/src/JWT.php#L57</a> What version of openssl do you have installed?</p>
<p dir="auto">Also, I'd make sure that the key (via JWKS) is always available to the client. I don't know that that is the issue, but if the public key is not available, that will cause problems.</p>
]]></description><link>https://fusionauth.io/community/forum/post/5294</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5294</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Thu, 07 Jul 2022 10:54:12 GMT</pubDate></item><item><title><![CDATA[Reply to Issuing Signature failed tokens on Thu, 07 Jul 2022 07:52:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi, any updates here?<br />
My token is valid for a year, but the signature failed for it. And it was issued by vend endpoint from FA. And it was signed by a key that was generated via "generate elliptic" button in the FA admin.</p>
]]></description><link>https://fusionauth.io/community/forum/post/5293</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/5293</guid><dc:creator><![CDATA[aleksandr.vits-rimer]]></dc:creator><pubDate>Thu, 07 Jul 2022 07:52:42 GMT</pubDate></item></channel></rss>