Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'popup closed by user' error on google sign in

Im using google signin, and its working fine locally. But when I put it on a server and try login i get

    'Uncaught: popup closed by user'

Ive disabled my adblocker, and anything that might be interfering. But still get the error.

Im using Vuejs to login, and I know all the code works, because I can login locally just fine.

I'll post the code anyways, even though Im pretty sure this isnt where the issue lies. My Vue.js methods for login are...

 clickButton(type) {
  var that = this
  that.signType = type
  auth2.grantOfflineAccess({ 'redirect_uri': 'postmessage', 'approval_prompt': 'force' }).then(that.onSignIn);
},

// Callback for Sign In
onSignIn(authResult) {
  if (authResult.code) {
    this.$store.dispatch(TYPES.GET_GOOGLE_TOKEN, { code: authResult.code })
  }
},
like image 220
Kylie Avatar asked Oct 15 '25 18:10

Kylie


1 Answers

I experienced the same issue. What i ended up doing was delete the oAuth app in Google console, and recreated it with all the Authorised URI correctly from the beginning (and not adding after creation). this fixed the problem.

I think that once you add URI's to the Redirect/Authorised URI lists to an existing oAuth app in the google console - either it takes long time for the update to take place or it just doesn't work.

like image 171
zivaricha Avatar answered Oct 17 '25 10:10

zivaricha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!