Search code examples
androidkotlinjwtandroid-jetpack-compose

BEST practice jwt in android?


trying to store JWT to use it to auth API requests in my jetpack application

i tried to use room DB i think it's overkill because it's only one variable and my application doesn't need that much storage

i tried to use data-store but i need to check if JWT is stored or not

so what is the best practice for JWT and android


Solution

  • It's pretty simple just store the JWT in the datastore and get where you need and then check whether that JWT key is empty or not in the datastore.