38 questions
0
votes
1
answer
156
views
Environment variables not working in React + Vite App (AWS Cognito auth issue)
I'm building a React application with Vite that uses AWS Cognito for authentication. I'm having issues with environment variables not being properly loaded or accessible in my application. ...
2
votes
0
answers
75
views
Difference between npm package @aws-sdk/client-cognito-identity and @aws-sdk/client-cognito-identity-provider
What's the main difference between @aws-sdk/client-cognito-identity and @aws-sdk/client-cognito-identity-provider?
Both seem to have essential support for cognito usage.
Thanks
1
vote
1
answer
238
views
How to modify a custom attribute of Cognito Userpool?
I have made application which requires login and signup. The data fields of users are like (name, emailid, password and role_type(default is visitor). So there are two roles- Admin and visitor. I have ...
0
votes
1
answer
137
views
How to implement developer-authenticated identities in cognito in JavaScript SDK v3 - getting 403 InvalidSignatureException response in Client
I am implementing developer-authenticated identities in an Angular app that uses the "Enhanced Workflow" from the official documentation. I followed the official guide for implementing this ...
0
votes
1
answer
109
views
Is there a way to lock users if they sign-in too many times in a short period in AWS Cognito?
Can i implement the solution using cloudwatch?
I looked into AWS cloudwatch but I could only set up metrics for logins in general, not per user. Or should i use lambda triggers and RDS to count the ...
1
vote
0
answers
118
views
Adding multiple users to my UI for AWS Cognito
My current log-in page is built using Astro.js and AWS Cognito. I have one user set-up on Cognito and that user could log-in to the app using the credentials I specify on Cognito and in the codes for ...
0
votes
1
answer
83
views
Cannot see the properties of CognitoUserPool Class from amazon-cognito-identity-js Nuxt3
I am using the amazon-cognito-identity-js library to create a new user in Amazon Cognito, but I cannot view the properties of the class CognitoUserPool.
My application is Nuxt3 using Pinia.
Steps that ...
0
votes
1
answer
525
views
eas build Package issue ("Validate that amazon-cognito-identity-js is linked" error message persisting)
I've recently made a local build for my Amplify/React Native/Expo project using eas build. Within the local build, when attempting to sign in using Amplify's Auth.signIn() feature, I am receiving the ...
0
votes
1
answer
149
views
NotAuthorizedException in Cognito by using vanilla JavaScript
I am using amazon-cognito-identity.min.js file got from NPM package and import in HTML page like mentioned below.
Got help from here.
<script src="cognito-identity-js/amazon-cognito-identity....
0
votes
1
answer
301
views
How do I verify a Cognito user is signed in for my API?
I am looking into using amazon-cognito-identity-js with my React frontend and boto3 with my Python backend. Once I have a user signed in on the frontend, how can I send an API request to my backend ...
0
votes
1
answer
832
views
amazon-cognito-identity-js on React frontend
Is it safe to use amazon-cognito-identity-js on a frontend application given that it will have your user pool and client ID?
I am trying to use Cognito in my React app (with a Python backend). I was ...
0
votes
1
answer
367
views
Cannot set properties of undefined (setting 'validationData') when trying to authenticate a user against amazon cognito in react js
I wouldn't say I'm new to JS but I haven't stuck with it long enough to be that knowledgeable so hopefully someone here can help. I have recently started making a website with React and I'm getting ...
5
votes
1
answer
2k
views
How to refresh AWS SDK JS V3 client credentials using a credential provider?
I am using the AWS SDK JS V3 in the browser in an Angular app along with Cognito to handle user authentication.
I am able to successfully instantiate the CognitoIdentityProviderClient using the ...
0
votes
1
answer
848
views
Cognito Userpool case sensitivity
Are Cognito userpool really case-insensitive by default?
I have created a Cognito userpool configuring the email as the only login field, but when I try to login using some uppercase letters in my ...
0
votes
0
answers
506
views
AWS CDK Cognito - create new CfnUserPoolGroup in same stack that creates the UserPool (typescript)
I want to create a few Groups in my AWS Cognito UserPool. I have a stack that is creating the user pool so want to add code similar to
[
{
groupName: 'administrators',
...
1
vote
1
answer
544
views
Issue with cognito social login for Apple
I have a website with social login (apple , google , facebook), the social logins are configured in cogntio user pool.
for the website to work it needs name and email from the providers to create ...
6
votes
0
answers
523
views
how to add new user to cognito user poll with google token?
xIn a react app I'm trying to set up federated sign-in with Google using AWS Cognito. When a user signs in with Google, the federated sign-in is successful and I receive a token from Auth....
0
votes
1
answer
93
views
Did not receive SMS from Cognito even thought it's a successful request
I'm unable to receive an SMS from using resendConfirmationCode method from amazon-cognito-identity-js. Even thought the request was sent successfully with a sample response of
{
AttributeName: "...
0
votes
1
answer
744
views
SPA user login with AWS JS sdk for Cognito
I'm trying to implement user login with username and password on a spa using aws cognito, but I keep getting error on the auth flow.
Previously I was using 'amazon-cognito-identity-js' and it was all ...
0
votes
1
answer
277
views
How can I attach an IoT Core policy to a Cognito Identity Id on a post authentication Lambda trigger for an Amplify deployed web application?
Situation:
I have a ReactJS web application that is deployed through AWS Amplify and uses Amplify Studio backend to handle authentication through Cognito services and aws-amplify sdk (sign in, sign ...
2
votes
0
answers
223
views
Is it pissible to login using Cognito Social Login without a hosted UI?
I'm using react-google-login and amazon-cognito-identity-js packages to log my users in.
I'd like to use the amazon-cognito-identity-js's auth method, passing the user's email and password, to call ...
0
votes
1
answer
198
views
amazon-cognito-identity-js callbacks
I am using amazon-cognito-identity-js and the callback looks something like this...
cognitoUser?.getUserAttributes((err, results) => {
if (err) {
console.log(err.message || JSON.stringify(err)...
0
votes
1
answer
241
views
Can I specify how to handle an error in a NodeCallback<any,any>?
I am learning React and Typescript and working on a React, Typescript, AWS Amplify Cognito project and trying to implement this method:
public confirmRegistration(
code: string,
forceAliasCreation: ...
2
votes
1
answer
4k
views
Setting up TOTP MFA with a QR Code using amazon-cognito-identity-js
Issue: I am having difficulty implementing use case 27 from the amazon-cognito-identity-js library, specifically in trying to modify it to use a QR Code. I am able to receive the secret code from &...
3
votes
1
answer
2k
views
AWS Cognito forgotPassword strange response when user does not exist
I'm using amazon-cognito-identity-js to reset user password. I call user.forgotPassword() and that all works fine, the user receives a verification code, etc.
However, something strange happens when I ...
0
votes
1
answer
1k
views
React native amazon-cognito-identity-js authenticateUser function too slow
I have a problem integrating library "amazon-cognito-identity-js" into react native. The authenticateUser function is too slow depending on the device:
Iphone XS: 40 seconds
Samsung galaxy ...
1
vote
1
answer
3k
views
@aws-sdk/client-s3 S3Client returning Error TypeError: Cannot read properties of undefined (reading 'send')
Following along with the AWS-SDK examples/documentation in a Gatsby app, I have the workflow below setup to upload a file to my S3 bucket from the client directly however, the const data = await ...
1
vote
0
answers
656
views
AWS Cognito not working in react native (android)
i am using AWS Amplify for authentication in react native app Auth.signIn() method does not give any response its does not give success or error response. In IOS its working fine. In Android its ...
1
vote
1
answer
2k
views
how to get user confirmation status from AWS Cognito
I need getting an information about user confirmation status, using amazon-cognito-identity-js
Using this function i can't do it
export const getCognitoUser = (email) => {
const userData = {
...
1
vote
0
answers
185
views
User is not authenticated message in response after succesful authenticateUser method and tokens generated in cognito-identity-js
User is not authenticated message is getting in the response while i'm trying to do updateUserAttribute, deleteUser (authenticated user), verifyUserAttribute, after succesful login authenticateUser ...
0
votes
2
answers
1k
views
AWS API Gateway Authorizer works with Cognito HostedUI but not with access_token from amazon-cognito-identity-js
When I use the Cognito HostedUI, I receive the access_token from URL parameters in callback page and feed it to my API call header as follows:
new HttpHeaders({
'Content-Type': 'application/json',
...
3
votes
1
answer
2k
views
Refreshing tokens in Cognito constantly fails with "invalid_grant" / "Invalid Refresh Token" error
I keep on getting an "invalid grant" error, yet for what I can tell I am doing it all as per spec. I can get the tokens just fine:
aws cognito-idp initiate-auth --auth-flow ...
1
vote
2
answers
4k
views
Understanding stores, context, sessions, and component hierarchy in Svelte/Sveltekit
I'm familiar with Svelte but completely new to Sveltekit. I'm trying to build a Sveltekit app from scratch using AWS Cognito as the authorization tool without using AWS Amplify, using the amazon-...
0
votes
1
answer
2k
views
amazon-cognito-identity-js setupMFA problems
I am attempting to setup MFA for users after they reset their passcode. The code runs smoothly until I hit mfaSetup, specifically the line user.associateSoftwareToken(). When I pass in 'this' instead ...
0
votes
1
answer
1k
views
Uncaught (in promise) TypeError: callback is undefined amazon-cognito-identity-js user.completeNewPasswordChallenge
all. Can anyone help me understand why I am getting a Uncaught (in promise) TypeError: callback is undefined in the below code? It does not make it to the on success or on failure clauses.
const ...
1
vote
1
answer
6k
views
NotAuthorizedException Incorrect username or password amazon-cognito-identity-js
I have been able to log in and log out for a while with the exact same email and password combination. However, now, every time I try to log in (I tried the following cases: disabled my user on the ...
0
votes
1
answer
533
views
cognito user session is persisted without storing tokens in localstorage
I am using the amazon-cognito-identity-js library in express/node backend to handle all authentication. Basically when I try to log in on my front end, it logs me in and persists the state without ...
0
votes
0
answers
934
views
AWS Cognito: How to delete user by access token in Node.js?
I am managing an application written in Node.js (restful backend) and React (frontend) and use AWS Cognito for user authentication.
In the frontend, I have a form which requests my backend to delete a ...