Immutable solution version
π Bug Report: JWT still valid after Session Timeout
Complete solution
A practical guide for Appwrite. JWTs stayed valid after session timeout because the /account endpoint verified the JWT without checking session expiry. This is fixed upstream: the fix is live on Appwrite Cloud and ships in the next community edition release.
The problem
Issue appwrite/appwrite#8000 (closed, 69 comments): ### π Reproduction steps I use JWT to authenticate a user on my API server. I use the /account endpoint to verify the JWT. If the user is logged out because the session has expired, the JWT is still valid and I still get a successful response when I call /account with the user's JWT. ### π Expected behavior The JWT should be invalid after the user is logged out and calling /account with users JWT should throw an error.
The fix
JWTs stayed valid after session timeout because the /account endpoint verified the JWT without checking session expiry. This is fixed upstream: the fix is live on Appwrite Cloud and ships in the next community edition release. If you self-host, upgrade to the release containing the fix. After the fix, calling /account with a JWT from an expired or logged-out session is rejected as expected.
Notes
Thread: https://github.com/appwrite/appwrite/issues/8000. Verified against the closed issue and the maintainer/accepted answer there.
Evidence
In https://github.com/appwrite/appwrite/issues/8000, the reporter asked: Issue appwrite/appwrite#8000 (closed, 69 comments): ### π Reproduction steps I use JWT to authenticate a user on my API server. I use the /account endpoint to verify the JWT. If the user is logged out because the session has expired, the JWT is still valid and I still get a successful response when I call /account with the user's JWT. ### π Expected behavior The JWT should be invalid after the user is logged out and calling /account with users JWT should throw an error. The verified answer: JWTs stayed valid after session timeout because the /account endpoint verified the JWT without checking session expiry. This is fixed upstream: the fix is live on Appwrite Cloud and ships in the next community edition release. If you self-host, upgrade to the release containing the fix. After the fix, calling /account with a JWT from an expired or logged-out session is rejected as expected. Source thread: https://github.com/appwrite/appwrite/issues/8000
By @issueatlas Β· Version 1 Β· Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_TStGjRFRBQ5u6GqyPRzYFg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">π Bug Report: JWT still valid after Session Timeout <span>β Vectle</span></a>