amazon-cognito

Can't resend verification code through AWS Cognito API

你离开我真会死。 提交于 2020-12-30 02:08:06
问题 I have an AWS Cognito User Pool where users are created through Cognito's API using the AdminCreateUser action, which works fine. This sends out a verification e-mail to the user, containing a temporary password. So far so good. Now a user did not receive this verification e-mail, so I need to send it again, using the ResendConfirmationCode action. I am attempting to do that with the below PHP code. $userPoolId = '[POOL_ID_HERE]'; $backendAppId = '[APP_ID_HERE]'; $clientSecret = '[SECRET_HERE

AWS Cognito - How To Get User's Group From Token Object

孤人 提交于 2020-12-29 10:14:32
问题 I can see the user's assigned User Pool group in the returned user data object in the console after logging in. Everything I've tried to assign the group to a variable has failed. What am I missing? I can easily get the client_id, JWT's, and attributes. The object path: let userGroup = user.signInUserSession.accessToken.payload.cognito.groups[0]; However, this works: user.signInUserSession.accessToken.payload.client_id; This section of the object looks like this. I can retrieve the token, the

AWS Cognito - How To Get User's Group From Token Object

*爱你&永不变心* 提交于 2020-12-29 10:07:58
问题 I can see the user's assigned User Pool group in the returned user data object in the console after logging in. Everything I've tried to assign the group to a variable has failed. What am I missing? I can easily get the client_id, JWT's, and attributes. The object path: let userGroup = user.signInUserSession.accessToken.payload.cognito.groups[0]; However, this works: user.signInUserSession.accessToken.payload.client_id; This section of the object looks like this. I can retrieve the token, the

AWS Cognito - How To Get User's Group From Token Object

孤街浪徒 提交于 2020-12-29 10:05:45
问题 I can see the user's assigned User Pool group in the returned user data object in the console after logging in. Everything I've tried to assign the group to a variable has failed. What am I missing? I can easily get the client_id, JWT's, and attributes. The object path: let userGroup = user.signInUserSession.accessToken.payload.cognito.groups[0]; However, this works: user.signInUserSession.accessToken.payload.client_id; This section of the object looks like this. I can retrieve the token, the

Microsoft oidc in AWS Cognito allowing multiple tenants

随声附和 提交于 2020-12-29 07:35:09
问题 I'm trying to implement social login using Microsoft account in AWS Cognito User Pools. I followed documentation and the solution mentioned in this thread: https://forums.aws.amazon.com/thread.jspa?threadID=287376&tstart=0 My problem is with setting the issuer to allow multiple tenants. This issuer works only for private accounts: https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0 This issuer works only for accounts in our directory (tenant): https://login

AWS Cognito Mock

一曲冷凌霜 提交于 2020-12-08 06:10:37
问题 I want to write BDD tests for my nodejs based API which uses AWS cognito as user authentication service, but I don't want to hit the real cognito service every time my build runs. Is there an easy and elegant way to mock Cognito calls. Used frameworks : Nodejs (Hapi.js) aws-sdk for nodejs 回答1: We have created an aws-sdk-mock npm module which mocks out all the AWS SDK services and methods. https://github.com/dwyl/aws-sdk-mock It's really easy to use. Just call AWS.mock with the service, method

How to register a new user using AWS Cognito Ruby SDK?

安稳与你 提交于 2020-12-06 13:15:55
问题 I would like to know how to register a new user using AWS Cognito Ruby SDK. So far I tried: Input AWS_KEY = "MY_AWS_KEY" AWS_SECRET = "MY_AWS_SECRET" client = Aws::CognitoIdentityProvider::Client.new( access_key_id: AWS_KEY, secret_access_key: AWS_SECRET, region: 'us-east-1', ) resp = client.sign_up({ client_id: "4d2c7274mc1bk4e9fr******", # required username: "test@test.com", # required password: "Password23sing", # required user_attributes: [ { name: "app", # required value: "my app name",

how handle refresh token service in AWS amplify-js

孤街醉人 提交于 2020-12-04 10:02:44
问题 In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I will call this for every 1 hour but it's not working for me. 回答1: After a long struggle, I found the solution to update the AWS Cognito refresh token, To do this I am using the

how handle refresh token service in AWS amplify-js

♀尐吖头ヾ 提交于 2020-12-04 10:01:24
问题 In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I will call this for every 1 hour but it's not working for me. 回答1: After a long struggle, I found the solution to update the AWS Cognito refresh token, To do this I am using the

how handle refresh token service in AWS amplify-js

廉价感情. 提交于 2020-12-04 10:00:16
问题 In my react project I am using AWS Cognito user pool for user management, for user authentication, I am using AWS Cognito idToken. after 90min the session will expire, then I need to refresh with new idToken. how to handle the refresh token service in AWS Cognito using amplify-js. I tried with Auth.currentSession() I will call this for every 1 hour but it's not working for me. 回答1: After a long struggle, I found the solution to update the AWS Cognito refresh token, To do this I am using the