How to fix 401 invalid credentials error when logging in with Memberstack dashboard-created users in React app?
Hi! I'm working on Memberstack integration for a React app. Currently I'm working in test mode.
I follow this doc, but I have issues with adding members. If I add a new member via dashboard I receive a 401 response when I try to log in with this user's credentials in the app (I checked multiple times that credentials are valid):
{"code":"invalid-credentials","message":"The provided credentials are invalid."}
When I sign up in the app, a new member is created, I am able to sign out and log in again with it. But this member is not displayed in dashboard.
I have only one Memberstack app, so the issue is not related to using wrong keys most likely.
Can't figure out what is the reason..

Comments
3 comments
Hey Kateryna Stukan,
I hope you are doing well. I just saw this. We currently have someone working on the Memberstack React Package. If you want to get this question answer by them please ask in our community slack and tag Dillon Raphael. You can get to the slack by going to memberstack.com/slack.
Just circling back here, as I answered on slack but this may be helpful for others.
Based on the reproduction Kateryna Stukan provided, it seemed they are using the create react app package. In this case, env variables need to be prefixed with REACT_APP. More information here: https://create-react-app.dev/docs/adding-custom-environment-variables/
Hi!
I'm having a problem with my memberstack endpoint, everything worked fine until this morning, when creating a new member I now get a 401 auth error, before today I wasn't getting any error and the sync with webflow CMS worked just fine.
I managed to solve it changing the scope of the middleware.
Please sign in to leave a comment.