Comments (15)
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.
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.
There is no 1.0.0-beta, do you mean 1.1.0-beta?
from vue-auth.
Also can you give me version of vue and vue-modules you are using.
from vue-auth.
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.
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.
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.
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.jshttps://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.
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.
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.
One thing.... if you update the plugin manually, but only the main file and not the utils, that maybe an issue...
from vue-auth.
Ok, so this is working for you now?
from vue-auth.
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.
i will update this and let you know
from vue-auth.
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)
- Built in cookie store broken in latest version? HOT 4
- Vue 3 Typescript not working, types missing HOT 1
- Integrate vue-auth with Keycloak HOT 1
- [Question] Authenticating users from external apps HOT 2
- How to set token expiration as refreshData interval HOT 1
- Vue3 Demo - Could not resolve dependency vue@"^3.2.0" from [email protected] HOT 2
- Handling MFA HOT 1
- Support pinia for vue 3 HOT 8
- How to extend Auth using v3 createAuth HOT 4
- This package is not working on VUE 3 + Vite
- token doesn't persist, suggested behavior vs Oauth 2.0 RFC spec? HOT 2
- Vue-Auth and Pinia HOT 10
- Vue 3 rolesKey option not supporting dot notation HOT 3
- redirect to page if i get 503 error HOT 2
- Storing multiple user credentials HOT 1
- Handling multiple roles from different keys HOT 2
- Redirect : Erreur 401 on apache server and not a local wamp HOT 4
- Package not working with Vue.js 3.3 and Vite HOT 1
- Missing Typescript definition for named route params
- Logout request executes after auth reset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-auth.