No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    JWT Cookies or Local Storage for Mobile Apps

    Framework
    3
    10
    754
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      susansiow last edited by

      After researching on this topic a couple of days, it seems the usage of JWT cookies is safer than local storage but is cookies applicable for Cordova mobile (Android/iOS) apps?

      metalsadman 1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Yes. From my understanding, using cookies in Cordova requires a plugin, but should be ok otherwise.

        @metalsadman can probably offer more insight.

        Scott

        S 1 Reply Last reply Reply Quote 0
        • metalsadman
          metalsadman @susansiow last edited by metalsadman

          @susansiow it’s relatively safe to use local storage in mobile apps. furthermore you can use something like https://github.com/softvar/secure-ls to encrypt your localstorage data. IOS clears the local storage on low memory without notice tho, so take also that in consideration.

          S 2 Replies Last reply Reply Quote 1
          • S
            susansiow @metalsadman last edited by

            @metalsadman Thanks for the light!

            1 Reply Last reply Reply Quote 0
            • S
              susansiow @s.molinari last edited by

              @s-molinari Thanks for sharing your view!

              metalsadman 1 Reply Last reply Reply Quote 0
              • metalsadman
                metalsadman @susansiow last edited by

                @susansiow just take note that IOS may clear the local storage on low memory without notice.

                S 1 Reply Last reply Reply Quote 1
                • S
                  susansiow @metalsadman last edited by

                  @metalsadman Noted with thanks! 😁

                  1 Reply Last reply Reply Quote 0
                  • S
                    susansiow @metalsadman last edited by

                    @metalsadman Sorry, just want to confirm that whether JWT cookies are applicable for Cordova mobile apps.

                    metalsadman 1 Reply Last reply Reply Quote 0
                    • metalsadman
                      metalsadman @susansiow last edited by metalsadman

                      @susansiow yeah, there should be a plugin out there in the cordova wild. I suppose you are looking for some kind of persistent login, then there also plugins that provide api where you can save your jwt in the app’s shared preference.

                      S 1 Reply Last reply Reply Quote 1
                      • S
                        susansiow @metalsadman last edited by

                        @metalsadman Noted, it means local storage is still the best choice in this case, thank you!

                        My backend API is constructed, I wonder if you can share your thoughts on my queries - https://forum.quasar-framework.org/topic/8081/cordova-mobile-apps-signed-builds-and-env-file , is it advised to break the app into two parts (backend API and frontend Cordova app) or is it fine to include both into a Cordova’s signed build? My concern is the .env file (with backend/db credentials).

                        Thanking you in advance!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post