Git Product home page Git Product logo

Comments (15)

websanova avatar websanova commented on June 24, 2024

Hmm, what version are you using?

I just tested it and it seems to work. Also as a fix for now you can try setting redirect to {path: '/find'}.

from vue-auth.

nshCore avatar nshCore commented on June 24, 2024

im using the 1.0.0beta with a fresh install, im redirected to the account page but never the actual page set as a redirect in the auth.js

console logging the data object in the success callback of fetchperform shows this

{"url":"auth/login","method":"POST","redirect":{"0":"/","1":"f","2":"i","3":"n","4":"d","name":"account"},"body":{"email":"[email protected]","password":"admin"},"rememberMe":false,"query":{},"root":"http://api.dev"}

it looks like its redirecting to the name not the value of [0], if i change the component vue file name in app.js for account to find i see the expected page, but regardless it doesn't explain why its exploding the value of the redirect to a single letter in an array

from vue-auth.

websanova avatar websanova commented on June 24, 2024

There is no 1.0.0-beta, do you mean 1.1.0-beta?

from vue-auth.

websanova avatar websanova commented on June 24, 2024

Also can you give me version of vue and vue-modules you are using.

from vue-auth.

nshCore avatar nshCore commented on June 24, 2024

Sorry 1.0.0 version of vue 1.1.0-beta of your auth code,

heres my package.json on gist
https://gist.github.com/jkirkby91-2/b5ee7f385972e61032b686caeb4e6196

from vue-auth.

websanova avatar websanova commented on June 24, 2024

Can I see some of your code.

How you are initializing it.

On Oct 13, 2016 20:43, "jkirkby91-2" [email protected] wrote:

Sorry 1.0.0 version of vue 1.1.0-beta of your auth code,

heres my package.json on gist
https://gist.github.com/jkirkby91-2/b5ee7f385972e61032b686caeb4e6196


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#35 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABkcy6xWBd8mc0kBL8eE2fLd15YV6AOeks5qzjOmgaJpZM4KUVR5
.

from vue-auth.

nshCore avatar nshCore commented on June 24, 2024

literally standard app all ive added is two vue pages find and link list nothing elese modified, here is the app.js

https://gist.github.com/jkirkby91-2/7307347e407975a602c9d6d78db2662a

from auth.js just changed the logindata object from / to /find

    authRedirect:       {path: '/login'},
    forbiddenRedirect:  {path: '/403'},
    notFoundRedirect:   {path: '/404'},

    registerData:       {url: 'auth/register',     method: 'POST', redirect: '/login'},
    loginData:          {url: 'auth/login',        method: 'POST', redirect: '/find'},
    logoutData:         {url: 'auth/logout',       method: 'POST', redirect: '/', makeRequest: false},
    oauth1Data:         {url: 'auth/login',        method: 'POST'},
    fetchData:          {url: 'auth/user',         method: 'GET'},
    refreshData:        {url: 'auth/refresh',      method: 'GET'},
    loginOtherData:     {url: 'auth/login-other',  method: 'POST', redirect: '/'},
    logoutOtherData:    {url: 'auth/logout-other', method: 'POST', redirect: '/admin', makeRequest: false},

    facebookData:       {url: 'auth/facebook',     method: 'POST', redirect: '/'},
    googleData:         {url: 'auth/google',       method: 'POST', redirect: '/'},

from vue-auth.

websanova avatar websanova commented on June 24, 2024

So where are you setting that loginData?

On Oct 13, 2016 22:15, "jkirkby91-2" [email protected] wrote:

literally standard app all ive added is two vue pages find and link list
nothing elese modified, here is the app.js

https://gist.github.com/jkirkby91-2/7307347e407975a602c9d6d78db2662a


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#35 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABkcy1HW4WAJyhNQ8HQL4Sqmun1pMzsJks5qzkrogaJpZM4KUVR5
.

from vue-auth.

nshCore avatar nshCore commented on June 24, 2024

in login.vue nothing changed apart from username to email

export default {
data() {
return {
context: 'login context',

            data: {
                body: {
                    email: '',
                    password: ''
                },
                rememberMe: false
            },

            error: null
        };
    },

    methods: {
        login() {
            this.$auth.login({
                body: this.data.body,
                rememberMe: this.data.rememberMe,
                redirect: {name: 'account'},
                success() {
                    console.log('success ' + this.context);
                },
                error(res) {
                    console.log('error ' + this.context);

                    this.error = res.data;
                }
            });
        }
    }
}

from vue-auth.

websanova avatar websanova commented on June 24, 2024

Ok, so I see you are hacking the plugin directly? Can you make sure it's the latest version. Or send me your hacked version [email protected] (also with the lib/*.js files).

from vue-auth.

websanova avatar websanova commented on June 24, 2024

One thing.... if you update the plugin manually, but only the main file and not the utils, that maybe an issue...

from vue-auth.

websanova avatar websanova commented on June 24, 2024

Ok, so this is working for you now?

from vue-auth.

websanova avatar websanova commented on June 24, 2024

Also, make sure you have the latest 1.3.0-beta, there have been some fixes and updates (for vue2 suppport as well).

from vue-auth.

nshCore avatar nshCore commented on June 24, 2024

i will update this and let you know

from vue-auth.

websanova avatar websanova commented on June 24, 2024

This should be well fixed in the latest 2.x stream as there are no longer any Vue objects being passed into the plugin.

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.