Home > front end >  issue in social login with google in vuejs (vueCLI)
issue in social login with google in vuejs (vueCLI)

Time:11-10

I have used frontend in vuejs(vueCLI) and backend in laravel api. I have issue in social login with google in vuejs. I used vue-social-auth package. Here is this link (https://forum.vuejs.org/t/laravel-vue-social-auth-spa/54341). I have follow this link code. Login with Google Properly Work. But I can't get a response in User info like name, email or google_id.. please help

CodePudding user response:

On your callback controller try to get user data using this code:

$platform='google';        
$userData = Socialite::driver($platform)->user();

When You disable session You could use stateless method. The stateless method may be used to disable session state verification. This is useful when adding social authentication to an API:

$platform='google';        
$userData = Socialite::driver($platform)->stateless()->user();
  • Related