Noob Expo + amplify + cognito question and beginne...
# help
n
Noob Expo + amplify + cognito question and beginner sst developer here, so please bare with me 🙂 I have created frontend pages signup, login and welcome page, I am able move between the pages, but I want to be able to use the aws cognito for login and signup, but am unable to get it to work. I have uploaded picture of the code for handleLogin, which fails with the AuthError picture. I then tried to follow suggestion 1, which failed (see 3rd picture). Do you know what is wrong? And do you need any other info, let me know
Followed the Expo guide in Serverless-stack, so an amplify project should be present, I guess?
m
hey @Nicklas Christiansen could you link me which guide you followed?
n
hey @manitej Followed this guide to setup the Expo project: https://serverless-stack.com/examples/how-to-create-an-expo-app-with-serverless.html Then I followed the big react/sst guide to setup the Auth stack: https://serverless-stack.com/chapters/adding-auth-to-our-serverless-app.html Resulting in the following 3 stacks, which I think is set up wrong unfortunately:
f
Hey @Nicklas Christiansen did u configure Amplify in ur Expo app?
I’m not familiar with Expo, but here’s what the config looks like for an React app https://serverless-stack.com/chapters/configure-aws-amplify.html
Give it a try. Btw, u shouldn’t need to run
amplify add auth
. We already created the Cognito User Pool using SST.
n
hey @Frank, This is my config.js and index.js in the src folder of the frontend folder: