Javascript React无法执行Google登录,没有可见错误

Javascript React无法执行Google登录,没有可见错误,javascript,reactjs,google-signin,Javascript,Reactjs,Google Signin,我最初的挑战始于 这帮助我到达了我看到谷歌登录屏幕的地方 并以 然而,当我点击账户时,谷歌页面消失了,什么也没发生,没有同意屏幕,没有错误。我使用的是纱线,我的应用程序在端口3000上运行 我的组件看起来像 /* global gapi */ import React from 'react'; class LoginButton extends React.Component { constructor(props) { super(props);

我最初的挑战始于

这帮助我到达了我看到谷歌登录屏幕的地方

并以

然而,当我点击账户时,谷歌页面消失了,什么也没发生,没有同意屏幕,没有错误。我使用的是纱线,我的应用程序在端口
3000
上运行

我的组件看起来像

/* global gapi */
import React from 'react';


class LoginButton extends React.Component {

    constructor(props) {
        super(props);

        this.onSignIn = this.onSignIn.bind(this);
    }


    onSignIn(googleUser) {
        console.log("user signed in"); // plus any other logic here
    }

    componentDidMount() {
        gapi.load('auth2', () => {
            // Retrieve the singleton for the GoogleAuth library and set up the client.
            this.auth2 = gapi.auth2.init({
                client_id: '793065532423867-j06sr2rufh7ns1kepcdolt9l22ph5pso.apps.googleusercontent.com'
            });
    }

    render() {
        return (
            <div className="g-signin2" data-onsuccess={this.onSignIn}></div>
        );
    }

}

export default LoginButton;
/*全球gapi*/
从“React”导入React;
类LoginButton扩展了React.Component{
建造师(道具){
超级(道具);
this.onSignIn=this.onSignIn.bind(this);
}
onSignIn(谷歌用户){
console.log(“用户登录”);//以及此处的任何其他逻辑
}
componentDidMount(){
gapi.load('auth2',()=>{
//检索GoogleAuth库的单例并设置客户端。
this.auth2=gapi.auth2.init({
客户端id:'793065532423867-j06sr2rufh7ns1kepcdolt9l22ph5pso.apps.googleusercontent.com'
});
}
render(){
返回(
);
}
}
导出默认登录按钮;
另外,我的google客户端设置看起来像

由于我在本地工作,我相信我现在不必做域验证

有人能帮我理解这个问题以及如何调试/修复它吗? 完整的存储库位于

提前谢谢