How to Save Token in securely in Flutter app and send token when we make any request

Issue

I want to secure the JWT token.I already went through the solution.

  • 1st I cant use SharedPreference because its not secure for
    sensitive information.
  • 2nd I used SecureStorage package, but when i saved my token in
    this SecureStorage, How i am gonna pass this token in further API
    calls which requires Token for Authorization. Because
    SecureStorage encrypt the token. whenever i try to read the token its
    just give me key of that token not actual value

Is there any other way to encrypt and decrypt the JWT Token ???

Solution

Review this library to save data
Hive
This library is easy to use and practical
Write and read example

Answered By – Nikolay

Answer Checked By – Pedro (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *