Last active
October 26, 2016 14:50
-
-
Save jobbin/549b2824c91e6623a9549a5a1114a7f7 to your computer and use it in GitHub Desktop.
[ Serverless ] Cognito、S3、Lambdaで認証機能付きのWebサイトを作ってみました<トラブルシューティング編> ref: http://qiita.com/jobbin/items/a640bea19dfc13721246
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cognito User Pool Id | |
AWSCognito.config.region = 'us-east-1'; | |
AWSCognito.config.credentials = new AWS.CognitoIdentityCredentials({ | |
IdentityPoolId: 'us-east-1:a999fc0e-b*************5d4fb6ffa' | |
}); | |
AWS.config.region = 'us-east-1'; | |
AWS.config.credentials = new AWS.CognitoIdentityCredentials({ | |
IdentityPoolId: 'us-east-1:a999fc0e-b*************5d4fb6ffa' | |
}); | |
AWS.config.credentials.get(function(){ | |
var accessKeyId = AWS.config.credentials.accessKeyId; | |
console.log("accessKeyId: " + AWS.config.credentials.accessKeyId); | |
var secretAccessKey = AWS.config.credentials.secretAccessKey; | |
console.log("secretAccessKey: " + AWS.config.credentials.secretAccessKey); | |
var sessionToken = AWS.config.credentials.sessionToken; | |
console.log("sessionToken: " + AWS.config.credentials.sessionToken); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment