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

    How implement authentication in ssr

    Help
    2
    7
    2518
    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.
    • Y
      y00rb last edited by y00rb

      Does any one know how implement authentication in ssr mode? I have old SPA in quasar, implement authentication using “LocalStorage”(also store some user profile to LocalStorage), but I need SSR, so the offcial has description:
      0_1539004138657_45e9ce84-ea20-4494-8900-0a5ae51cbcc0-image.png
      So I hope any example or solution to implement authentication in SSR

      1 Reply Last reply Reply Quote 0
      • nothingismagick
        nothingismagick last edited by

        Check out this post by Adam:

        https://medium.com/quasar-framework/updating-to-quasar-0-17-x-with-firebase-authentication-91c129606859

        Y 1 Reply Last reply Reply Quote 0
        • Y
          y00rb @nothingismagick last edited by

          @nothingismagick Thank you! But Do you know some solution based on cookie or other native storage(Doesn’t like Firebase, it should connect to thrid-party)

          1 Reply Last reply Reply Quote 0
          • nothingismagick
            nothingismagick last edited by

            I totally understand.
            You can check out this starter that we built. Use feathers and connect to your DB on the server side.

            https://github.com/nothingismagick/quasar-starter-ssr-pwa-jest-cypress

            Y 1 Reply Last reply Reply Quote 0
            • Y
              y00rb @nothingismagick last edited by

              @nothingismagick in the project, I did implemented api access in axios, then save token into local storage, then we need SSR to improve SEO, so we create blank quasar project in 0.17.19, move old project to new one. How the solution compatibility in the case? in 0.17.19 with SSR, localstorage can’t used to store data, we also save some user’s data in localstorage except save user’s token.
              I saw the feathers solution, we need change all api access. BTW, the example has no solution for storage item in SSR, Should I implement it in cookie?

              1 Reply Last reply Reply Quote 0
              • nothingismagick
                nothingismagick last edited by

                yes, you should use cookie.

                1 Reply Last reply Reply Quote 0
                • nothingismagick
                  nothingismagick last edited by

                  But you should REALLY take a deep look into what SSR is and does, specifically how to isolate components from the server / client in quasar.conf.js

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