Javascript google plus登录的取消按钮

Javascript google plus登录的取消按钮,javascript,jquery,twitter,google-plus,Javascript,Jquery,Twitter,Google Plus,在twitter中,当用户按下“取消”按钮时,它被重定向到此URL: URL/verify?denied=TOKEN 因此,您可以通过URL中的denied来确定它 在google+登录中,是否有方法检测登录页面中的取消按钮或javascript或jquery的关闭按钮?在回调函数中,如果用户拒绝同意对话框,将返回错误代码 检查访问被拒绝的回调示例,表示用户拒绝了同意对话框: function onSignInCallback(authResult) { if (authResult

在twitter中,当用户按下“取消”按钮时,它被重定向到此URL:

URL/verify?denied=TOKEN

因此,您可以通过URL中的
denied
来确定它


在google+登录中,是否有方法检测登录页面中的取消按钮或javascript或jquery的关闭按钮?

在回调函数中,如果用户拒绝同意对话框,将返回错误代码

检查访问被拒绝的回调示例,表示用户拒绝了同意对话框:

  function onSignInCallback(authResult) {
    if (authResult['access_token']) {
      // success
    } else if (authResult['error']) {
      if (authResult['error'] == 'immediate_failed'){
        // This is perfectly normal, the user reached the site and was not logged in
        // However, if the user should be signed in on this page, it would be
        // appropriate to have an error here
      }
      if (authResult['error'] == 'access_denied'){
        // The user cancelled out of the dialog.
      }

      // There was an error, which means the user is not signed in.
      // As an example, you can handle by writing to the console:
      console.log('There was an error: ' + authResult['error']);
    }
    console.log('authResult', authResult);
  };

你能确定用户是否按下关闭按钮吗?