Coder Social home page Coder Social logo

Comments (4)

websanova avatar websanova commented on August 29, 2024

Well this is separate from anything you would have on your server. Do you see an auth token in local storage/cookie?

from vue-auth.

itokia avatar itokia commented on August 29, 2024

Yes, my token exists. it's just the redirection to the original address that is not taken into account on the server.

'''const redirect = this.$auth.redirect();'''

from vue-auth.

websanova avatar websanova commented on August 29, 2024

Not really sure what you're asking here. The vue-auth plugin is for front end so it doesn't really have anything to do with the server other than dealing with tokens. If there is a redirect after login on your front end it should have nothing to do with server.

from vue-auth.

itokia avatar itokia commented on August 29, 2024

I managed to find the solution, I'll share it with you just in case.
You need to modify the quasar.config to change it to 'history' mode and not hash.

Then, for this to work properly under redhat8 you need to add the following apache conf:

        RewriteEngine On
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
        RewriteBase /
        RewriteRule ^index\.html$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.html [L]
        Header set Cache-Control "no-cache"
        Require local

And finally, put this in the js code:

const redirect = auth.redirect();
  auth
    .login({
      fetchUser: true,
      data: "",
      staySignedIn: true,
      redirect: {
        path: redirect ? redirect.from.fullPath : "",
      },
    })```

from vue-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.