Youtube API Ouath验证的Chrome控制台错误,拒绝显示:在框架中,因为它设置了X-Frame-Options'到#SAMEORIGIN'

时间:2016-07-29 12:01:34

标签: google-chrome google-api youtube-api google-api-client x-frame-options

拒绝显示' https://accounts.google.com/o/oauth2/auth?client_id= ******'在一个框架中因为它设置了X-Frame-Options'到' SAMEORIGIN'。

click here to see the chrome console error

在auth.js中执行googleApiClientReady()代码

  // Upon loading, the Google APIs JS client automatically invokes this callback.
    googleApiClientReady = function() {
      gapi.auth.init(function() {
        window.setTimeout(checkAuth, 1);
      });
    }

1 个答案:

答案 0 :(得分:1)

尝试类似

的内容

gapi.auth.authorize({       client_id:clientId,              范围:范围,       立即:立即     },handleAuthResult);