8kSec’s Post

View organization page for 8kSec, graphic

2,407 followers

Q: What's the best way to securely handle authorization tokens in mobile apps? Should we store and manage the tokens on the device, or keep them on the server and use a user ID for requests? Is that secure, especially for sensitive data? A: In order to authenticate the user, you need to have some kind of local storage mechanism to store the user token. It is recommended to use platform-provided secure storage mechanisms. For example, on Android, use the Keystore system; on iOS, use the Keychain. Ensure it's using proper Keychain attributes https://lnkd.in/gCTYSNTe. Also consider implementing short-lived tokens with refresh mechanisms. This limits the potential damage if a token is compromised. Usually, if you are storing token locally, the attackers needs to have physical access to the device to get the token. The chances of this are almost negligible. It is recommended to use JWT tokens as they are self-contained, meaning they include all the information needed to verify the user, such as the user ID and expiration date. This eliminates the need for server-side sessions. Since JWT tokens are stored on the client-side (typically in secure storage on mobile devices as mentioned above), the server does not need to manage session data, which simplifies the architecture overall. #MobileSecurity #AppSecurity

  • What's the best way to securely handle authorization tokens in mobile apps?

To view or add a comment, sign in

Explore topics