Trouble signing in after deploying NotedlyFebruary 7, 2021 at 9:46pm
Hi! I deployed the Notedly app on Friday night and I'm unsure why I can't sign back in after signing up. I connected to MongoDB directly and it listed all the new users, so I'm not sure what else to check. Has anyone else had this issue before? Thanks in advance!
February 8, 2021 at 10:11pm
The error message I get in the app is from the deployed version. It says "Error signing in!". The message in the web inspector is:
"Failed to load resource: the server responded with a status of 400 (Bad Request). Unhandled Promise Rejection: Error: Network error: Response not succesful:: Received status 400
I'll attach a screenshot of it for further help.
I went back in the book to double-check the mutations, the src/index.js file, the JWT_SECRET variable both in the .env file and in Heroku, my connection in mongoDB to see if there's any misspelling in the connection string, src/signup.js, and signin.js and they seem fine to me.
So it works, locally, I can sign in and I can see the token, too. Please, see the attached screenshot. I also created a new account in the GraphQL Playground, then signed back in and that worked.
Also locally, I constantly get an undefined in the terminal whenever I:
- sign up and sign in in the Playground
- click on any of the pages (except for New)
- Sign Up / Log Out
I'm not sure if these have to do anything with the error I'm getting in the deployed version of the app. I hope any of this helps.
I forgot to mention that when I sign up in the deployed version, I do see the token generated. So I see it in both versions of the app. It's just that I can't sign back into the deployed app.
February 11, 2021 at 4:48am
February 11, 2021 at 3:55pm
February 20, 2021 at 6:27am
February 20, 2021 at 5:32pm