11
How would you design an authentication flow for a web service?
Tap to write answer
0 words | 0 charsPress Enter ↵ to reveal
Your Attempt
0 wordsRefined Model Answer
ReferenceI would start by deciding whether the service should use sessions, JWTs, or another token-based method. Then I would make sure login, token issuance, token refresh, and logout are all handled securely. The reason I choose a structured flow is that authentication mistakes often come from unclear token lifetimes or weak session handling. I would also discuss secure storage, transport encryption, and how to revoke access if a token is compromised. If the interviewer wants more depth, I would compare server-side sessions with stateless tokens.