Closed rabichawila closed 4 years ago
Use the right google ‘clientId’ not app id
Hi, I have the same issue.
I follow the auth config from Socialite
bootstrap.js
import Vue from 'vue'
import VueSocialauth from 'vue-social-auth'
Vue.use(VueSocialauth, {
providers: {
facebook: {
client_id: 'XXX',
client_secret: 'XXX',
redirect: '/auth/facebook/callback'
}
}
});
login.blade.php
<button @click="authProvider('facebook')">Facebook</button>
. . . .
methods: {
authProvider(provider){
this.$auth.authenticate(provider)
.then(response => {
this.socialLogin(provider, response)
}).catch(error => {
console.log(error)
})
},
socialLogin(provider, response){
axios.post('/auth/'+provider, response)
.then(response => {
console.log(response)
console.log(response.data)
}).catch(error => {
console.log(error)
})
},
. . . .
When the button clicked, I got error Request handler instance not found
https://www.npmjs.com/package/vue-axios - this solved my issue.
import VueAxios from 'vue-axios' Vue.use(VueAxios)
https://www.npmjs.com/package/vue-axios - this solved my issue.
import VueAxios from 'vue-axios' Vue.use(VueAxios)
Thank you very mutch , i want just to add another thing , it will work fine if you add this: import axios from 'axios' import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios) you need to use axios and VueAxios in the some time.
Thanks
Trying to implement this on nuxtjs, but i keep on getting this error:
Request handler instance not found
I am pretty sure that i have
axios
because it comes with nuxt js by default, and i'm using it in my app.vue-social-auth.js
nuxt.config.js
component.vue