A mobile app's users must sign in again every 15 minutes, which matches the access token lifetime set by the identity provider. The security team wants to keep short-lived access tokens without repeated prompts. What should be implemented?
Show the answer
Correct answerA. Add a refresh token flow to renew access tokens
AWhy this is right: A refresh token is exchanged for new access tokens, keeping lifetimes short and avoiding repeated sign-ins.
BWhy not this: Storing the password on the device adds a long-lived secret to steal and is worse than a token flow.
CWhy not this: A static API key never expires on its own and has no per-user session context, so it is weaker than tokens.
DWhy not this: A 30-day access token means a stolen token stays useful for weeks, defeating the reason for a short lifetime.
A refresh token lets the app obtain new short-lived access tokens without user interaction, so the access token's short lifetime stays intact. Lengthening the access token lifetime removes the benefit of short-lived tokens and enlarges the window if one is stolen.