How to use the CognitoIdentityServiceProvider function from aws-sdk
Find comprehensive JavaScript aws-sdk.CognitoIdentityServiceProvider code examples handpicked from public code repositorys.
GitHub: orta/claudia
12 13 14 15 16 17 18 19 20 21
apiGatewayPromise = retriableWrap(new aws.APIGateway({ region: awsRegion })), s3 = new aws.S3(), iot = new aws.Iot({ region: awsRegion }), sns = new aws.SNS({ region: awsRegion }), events = new aws.CloudWatchEvents({ region: awsRegion }), cognitoIdentityServiceProvider = new aws.CognitoIdentityServiceProvider({ region: awsRegion }), destroyRule = function (ruleName) { return events.listTargetsByRule({ Rule: ruleName }).promise() .then(config => { const ids = config.Targets.map(target => target.Id);
290
0
3
13 14 15 16 17 18 19 20 21 22
} = require('../../src/business/entities/EntityConstants'); const { CognitoIdentityServiceProvider, DynamoDB } = require('aws-sdk'); const { getUserPoolId, getVersion } = require('../util'); const { search } = require('../../src/persistence/elasticsearch/searchClient'); const cognito = new CognitoIdentityServiceProvider({ region: 'us-east-1' }); const dynamo = new DynamoDB({ region: process.env.REGION }); /** * Creates a cognito user
35
72
19
GitHub: carlos-jmh/large-project
38 39 40 41 42 43 44 45 46
authorizationToken, requestContext: { queryString, variables }, } = event; // use athorizationToken to determine the sub of the caller from cognito const cognito = new AWS.CognitoIdentityServiceProvider(); const accessToken = authorizationToken.replace(/^Banana\s/, ""); try { const userInfo = await cognito.getUser({ AccessToken: accessToken }).promise();
2
4
0
+ 2 other calls in file
GitHub: milk531/amplify-s3
339 340 341 342 343 344 345 346 347 348 349
sessionToken: Credentials.SessionToken, }; } async function refreshJWTs(authConfig) { const CognitoISP = new aws.CognitoIdentityServiceProvider({ region: authConfig.region }); try { const result = await CognitoISP.initiateAuth({ AuthFlow: 'REFRESH_TOKEN', AuthParameters: {
2
0
3
+ 8 other calls in file
10 11 12 13 14 15 16 17 18 19 20 21 22
AUTH_AMPLIFYIDENTITYBROKERAUTH_USERPOOLID Amplify Params - DO NOT EDIT */ const AWS = require('aws-sdk'); var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider(); exports.handler = async (event) => { if (!(event && event.queryStringParameters)) { return {
0
0
1
+ 29 other calls in file
19 20 21 22 23 24 25 26 27 28 29 30 31
const qs = require('querystring'); var kmsClient = new AWS.KMS(); var docClient = new AWS.DynamoDB.DocumentClient(); var cognitoSP = new AWS.CognitoIdentityServiceProvider(); var codesTableName = process.env.STORAGE_AMPLIFYIDENTITYBROKERCODESTABLE_NAME; var appClientID = process.env.AUTH_AMPLIFYIDENTITYBROKERAUTH_APPCLIENTIDWEB; function base64URLEncode(str) {
0
0
1
+ 18 other calls in file
GitHub: lep511/AWS
22 23 24 25 26 27 28 29 30 31
userPoolId = null, identityPoolId = null, clientAppId = null; aws.config.region = region; var cognitoProvider = new aws.CognitoIdentityServiceProvider(), cognitoIdentity = new aws.CognitoIdentity(); async.waterfall([
0
0
0
309 310 311 312 313 314 315 316 317 318 319 320 321
return await handler(event, context) } const a_user_signs_up = async (password, name, email) => { const cognito = new AWS.CognitoIdentityServiceProvider() const userPoolId = process.env.COGNITO_USER_POOL_ID const clientId = process.env.WEB_COGNITO_USER_POOL_CLIENT_ID
0
0
0
23 24 25 26 27 28 29 30 31 32
以下の Lambda を作成。AWS SDK により Cognito 認証を行い、成功すれば IoT Core に関するポリシーを返す。 環境変数(ClientID)として Cognito のアプリクライアント ID を設定する。 ```js const aws = require('aws-sdk'); const cognito = new aws.CognitoIdentityServiceProvider(); exports.handler = async function (event, context, callback) { const originalUserName = event.protocolData.mqtt.username; // AWS SDKでMQTTpublishした際、usernameは"ユーザ名?SDK=PythonV2&Version=xx"として渡されるのでユーザ名を抽出
0
0
1
aws-sdk.S3 is the most popular function in aws-sdk (7245 examples)