Decoding is not verifying. This page reads the token; it can't tell whether the signature is valid. Your server must verify every token with the algorithm and key it expects, and reject anything else.
The checks, and why they matter
| Check | Why |
|---|---|
| alg = none, or empty signature | The token isn't signed, so anyone can forge it. Servers must only accept an allow-listed algorithm. |
| HS256 / HS384 / HS512 | One shared secret both signs and verifies. If it's short or leaks (for example shipped in a frontend), anyone can mint tokens. |
| jku, x5u or jwk in the header | The token tells the server where to find its key. Trusting that lets an attacker supply their own key. |
| No exp, or a very long lifetime | A leaked token stays useful until it expires. Short-lived access tokens limit the damage. |
| No aud / iss | Without them, a token issued for one service can be replayed on another that trusts the same issuer. |
| Personal data or secrets in claims | A signed JWT is only base64url-encoded: anyone holding it can read the payload. |
| High-privilege role (e.g. service_role) | Such a token bypasses normal access rules. In Supabase, the service_role key bypasses Row Level Security and must stay server-side. |
Related: exposed API key checker · Supabase RLS checker · Supabase "JWT expired" · get auth fixed
Sources
- RFC 7519, JSON Web Token: rfc-editor.org/rfc/rfc7519
- RFC 8725, JWT Best Current Practices: rfc-editor.org/rfc/rfc8725