diadal / vue-social-auth

Laravel Vue (SPA) Social Auth
75 stars 27 forks source link

Dont know what to do next. #6

Closed yabuking84 closed 4 years ago

yabuking84 commented 5 years ago

Im new to social authentication so please bear with me.

Here is in my main.js providers: { google: { clientId: 'xxxxxxxx-xxxxxxxx.apps.googleusercontent.com', redirectUri: 'https://myredirect.uri.com/auth/google/callback', } }

on my component I have this : authenticate (provider) { console.log(this.$auth); var ths = this; this.$auth.authenticate(provider).then(function (rspns) { alert('Social Authentication: ',rspns); ths.SocialLogin(provider,rspns) }).catch((e) => { console.log('Error: ' + e); }) },

so when I clicked this button <v-btn @click="authenticate('google')">auth Google</v-btn> it will open a pop up and show the google accounts to which to sign in with. then after choosing the account it just go to the redirectUri. The pop up doesnt close, it just goes to the redirectUri. Im not sure what to do next. Im not sure also what to do on the redirectUri page. I just want to retrieve that the Google login was a success then get the profile details.

Thank you.

diadal commented 5 years ago

Did you create the Vue route you need to create the Vue route

diadal commented 5 years ago

‘’’

    {
      path: '/auth/:provider/callback',
      component: {
        template: '<div class="auth-component"></div>'
      }
    },

‘’’

packdev122 commented 4 years ago

This issue is fixed? I got the same error for the Facebook and Twitter. It works well on the localhost but after deploy on the production not closing the popup. @diadal could you help me?

packdev122 commented 4 years ago

I'm working on Laravel + Vue(Laravel Vue Spa)

diadal commented 4 years ago

Did you create the Vue Route?

https://github.com/diadal/vue-social-auth/issues/6#issuecomment-526809581 @samplecoder122