API testing · Auth
Access token is valid for 10 years instead of 15 minutes
P2 · MajorExperiencedAuth
Want to find it yourself first? This page gives away the answer. Play this bug on a fake app screen and see if you can spot it in three tries.
The clue
Compare the token’s rules with its dates.
Steps to reproduce
- Sign in
- Decode the access token and read its expiry
Expected result
expires = issued + 15 minutes (10:15)
Actual result
expires on 2036-11-04, so a stolen token works for a decade
Why it matters
This is a major (P2) bug. The feature still works in part, but users get wrong information or a broken step, and many will notice. It should be fixed before or soon after release.
Testing tip
Decode tokens in tests (jwt.io or a library) and check expiry, audience and type, not just that sign-in works.
How to find bugs like this
API bugs live in the JSON between the app and the server: wrong records returned, fields that leak private data, bad status codes and limits that are not enforced. When you test, try these checks:
- Read the whole response body, not only the status code.
- Ask for other users’ records on purpose.
- Look for fields that should never leave the server.
- Send values at and past every limit.