vue-authenticate
vue-authenticate copied to clipboard
Can this be used without vue-axios - just axios?
I just want to use axios and don't feel the need to add bloat with wrapper classes like vue-axios. I already use axios in my vue app and don't need vue-axios. Is there a way to get vue-authenticate to use it without the wrapper class?
Up!
Sorry, i was a bit off from this project. Starting to resolve these issues now...
You can use only axios, but you'll have to use vue-authenticate as a service, instead as a Vue plugin. Just like here (https://github.com/dgrubelic/vue-authenticate#vuex-authentication), instead of passing Vue.prototype.$http, you should be able to pass axios object and the rest should work. Give it a try and let me know.
@menasheh example:
const http = axios.create({})
const vueAuth = new VueAuthenticate(http, {
baseUrl: 'SERVER API URL'
providers: {
google: {
clientId: 'some-random-id',
redirectUri: 'http://localhost:3000/auth'
}
}
})