问题描述
我是AWS服务的新手。我已经在Web应用程序中完成了注册,并且希望我的html页面显示当前经过身份验证的Cognito用户。HTML代码为
<html>
<script>
var cognitoUser;
var poolData = {
UserPoolId: _config.cognito.userPoolId,ClientId: _config.cognito.userPoolClientId
};
var userPool;
userPool = new AmazonCognitoIdentity.CognitoUserPool(poolData);
cognitoUser = userPool.getCurrentUser();
document.getElementById('hello').InnerHTML = cognitoUser;
</script>
<body>
<span id="hello"></span>
</body>
<script src="/jquery-3.1.0.js"></script>
<script src="/bootstrap.min.js"></script>
<script src="/aws-cognito-sdk.min.js"></script>
<script src="/amazon-cognito-identity.min.js"></script>
<script src="/config.js"></script>
<script src="/cognito-auth.js"></script>
</html>
我得到的错误是说在第8行中找不到变量:_config 。 我什至不确定自己在做什么,对吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)