van-dt / AWS-Amplify-AppSync-ChatApp

A research project on new combo with AWS GraphQL
0 stars 0 forks source link

Issue while SignUp and SignOut #1

Open sriharshini22 opened 9 months ago

sriharshini22 commented 9 months ago

I'm facing issues while creating an account using the Signup option. Do you know how I can resolve these issues? I have looked into other solutions as well but nothing worked. Can I get through them?

Screenshot 2024-02-20 123635

van-dt commented 9 months ago

@sriharshini22 Did you run amplify push? reffer to https://docs.amplify.aws/javascript/build-a-backend/auth/set-up-auth/

sriharshini22 commented 9 months ago

Yeah, I have tried it but it doesn't work.

van-dt commented 9 months ago

@sriharshini22 If there are no issues, can you please show me the code snippet of Amplify.configure?

sriharshini22 commented 9 months ago

Sorry but the backend deployment isn't done due to these errors.. Can you let me know how can I get through it ? While exection the FileStorageStack needs runtime of 20.x but it's taking 14.x. So, I have tried changing it in the IDE and Cloud Formation Designer. It doesn't work because whenever I deploy using cdk deploy --all or the cmd you have given. It reverts back to 14.x by itself. HOW DO I OVERCOME THIS ERROR ??

WhatsApp Image 2024-02-21 at 09 18 11_346e6391

van-dt commented 9 months ago

@sriharshini22 The repository I created almost a year ago seems to have become outdated. I encountered this issue not long ago; AWS and CDK have both updated their policies for S3, so we can only initialize the bucket using CDK and then manually update relevant policies on S3 through the AWS console interface. I have pushed the new code again, so you can pull it and try again.

sriharshini22 commented 9 months ago

Okay, I'll look into it now. It worked!! Thank you.

I'll send you the Amplify.configure file.

sriharshini22 commented 9 months ago

This is the Amplify. configure file. image

van-dt commented 9 months ago

It seems like you haven't replaced the userPoolWebClientId and identityPoolId. Replace them with the values of UserPoolClientId and IdentityPoolId in the output.json file. Then replace all the code in aws-export.js with the code from aws-exports-sample.js and restart the client.

sriharshini22 commented 9 months ago

Where do I find the IDs ? I have searched for them in cognito but I couldn't find them ? can you send me some examples ? if possible

van-dt commented 9 months ago

In the backend, run the command cdk deploy --all --outputs-file ./output.json to obtain the necessary values for the client in file output.json is generated . ref to: https://github.com/van-dt/AWS-Amplify-AppSync-ChatApp/tree/master/chat-app-backend#integrating-with-a-frontend

in Cognito:

1708513031189

sriharshini22 commented 9 months ago

Yeah, I have got it. But there isn't any change.

image image

van-dt commented 9 months ago

Try running amplify import auth and select your Cognito on the client to see how it goes. Then amplify push ✌️

sriharshini22 commented 9 months ago

It worked and I'm facing these errors.

image image

sriharshini22 commented 9 months ago

I have checked the configuration files. But all are of same region. Why do I get this error ?

sriharshini22 commented 9 months ago

Hi, Can you help me with the above errors ? Thank you!

van-dt commented 9 months ago

I'm sorry, but this repository still has existing issues related to S3, and I haven't fixed them yet. You can refer to this to create an AppSync API for uploading to S3 and calling it from the client.

sriharshini22 commented 9 months ago

Okay, I'll look into it. And also I was trying to make changes in the node modules files and when I started the execution after the changes, I saw there was no difference in the console error. Can you let me know why I'm facing this issue?

WhatsApp Image 2024-03-02 at 17 20 43_ee962f89 WhatsApp Image 2024-03-02 at 17 20 26_83875c2d

Thank you!

sriharshini22 commented 8 months ago

Hi, Are there any updates with the issues ? Thank you