DenVebber
DenVebber

Reputation: 163

Where can I store JWT tokens in Unity mobile app?

I'm looking for the best solution to store access and refresh JWT tokens (in Unity Android mobile app), which I receive from server. I can save it in a player prefs, asset bundles or smartphone memory, but which solution will be safer?

Upvotes: 3

Views: 2034

Answers (1)

Igor Belikov
Igor Belikov

Reputation: 272

PlayerPrefs is solution you are looking for. It is kind of generic solution for iOS and Android and it is alternative to SharedPreferences in Android and Keychain in iOS. If you need encryption then you can implement a wrapper which will encrypt on saving and decrypt on loading.

Upvotes: 1

Related Questions