I am using Laravel 8 with Vue2
My Vue Js Code structure is as below
import Vue from 'vue';
import VueRouter from "vue-router";
// Vue.component('loader', require('@imageloader/Loader.vue').default);
import loader from '@imageloader/Loader.vue';
import axios from 'axios';
import VueAxios from 'vue-axios'
import VueSocialauth from 'vue-social-auth';
I am using Laravel 8 with Vue2
My Vue Js Code structure is as below import Vue from 'vue';
import VueRouter from "vue-router";
// Vue.component('loader', require('@imageloader/Loader.vue').default); import loader from '@imageloader/Loader.vue'; import axios from 'axios'; import VueAxios from 'vue-axios' import VueSocialauth from 'vue-social-auth';
const routes = [ { path: '/auth/:provider/callback', component: { template: '
' } }, ]; const router = new VueRouter({ routes, mode: "history", linkActiveClass: "active" }); var x = screen.width / 2 - 700 / 2; var y = (screen.height / 2 - 450 / 2) - 200; // console.log(process.env.MIX_PUSHER_APP_KEY); Vue.use(VueRouter); Vue.use(VueAxios, axios) Vue.use(VueSocialauth, {providers: { google: { clientId: process.env.MIX_GOOGLE_CLIENT_ID, redirectUri: process.env.MIX_APP_URL + 'social-login/google/callback', // Your client app URL, popupOptions: { width: 552, height: 633, left: x, top: y } }, facebook: { clientId: process.env.MIX_FACEBOOK_CLIENT_ID, redirectUri: process.env.MIX_APP_URL + 'social-login/facebook/callback', // Your client app URL, popupOptions: { width: 552, height: 633, left: x, top: y } } } }) import './components/component'; const app = new Vue({ el: '#app', router,
components: { loader: loader } });
I am successfully getting access into my laravel route and subscribe the user My laravel controller code is as below
**if ($provider == 'twitter') { $user = Socialite::driver('twitter')->user(); } else { $user = Socialite::driver($provider)->stateless()->user(); // dd($user); } $old_user = $this->user->where('email', $user->email)->first(); if($old_user){
but my window is not closing