这是关于供应商锁定和AWS认知的问题.如果我们离开AWS,用户数据和加密/散列密码是否可以从cognito导出?
可以/是否可以使用标准哈希或用户密码的可配置哈希或允许导出令牌之类的东西?
我正在使用AWS Cognito来用户用户池和身份验证.
我的注册工作正常,但我的登录功能引发了错误:
/node_modules/aws-sdk/lib/request.js:31 throw err; ^
ReferenceError:未定义窗口
这是功能:
app.post('/login', function(req, res, next) {
console.log("Email: " + req.body.email);
console.log("Password: " + req.body.password);
var authenticationData = {
Username: req.body.username,
Password: req.body.password
};
var authenticationDetails = new AWS.CognitoIdentityServiceProvider
.AuthenticationDetails(authenticationData);
var poolData = {
UserPoolId: '*removed for security*',
ClientId: '*removed for security*'
};
var userPool = new AWS.CognitoIdentityServiceProvider.CognitoUserPool(
poolData);
var userData = {
Username: req.body.username,
Pool: userPool
};
var cognitoUser = new AWS.CognitoIdentityServiceProvider.CognitoUser(
userData);
cognitoUser.authenticateUser(authenticationDetails, {
onSuccess: function(result) {
console.log('access token + ' …
Run Code Online (Sandbox Code Playgroud)