You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to setup and install both the easy-shop and the backend. I was able to register but whenever the get is fired off (after register and login), I get the error:
[Unhandled promise rejection: Error: Request failed with status code 401]
It looks like it is happening on the return from the login. After I login the user id that is passed to the get is undefined.
Are there updates to the code to fix this?
Also, I can see my console logs on the back end but I do not see any console logs on the front end. Can you tell me where these logs are written so that I can look at them?
The text was updated successfully, but these errors were encountered:
That doesn't cause this. There is a minor bug in easy-shop/Screens/User/UserProfile.js
From lines 28 to 55, everything should be wrapped in an "else" case which is connected to the "if" on line 22.
The reason is that we only want these actions if the user is authenticated. If not, we will just navigate him to the login page.
Also, on line 32, I switched context.stateUser.user.sub to context.stateUser.user.id, and now I don't receive undefined, but rather a proper id from params.
That doesn't cause this. There is a minor bug in easy-shop/Screens/User/UserProfile.js From lines 28 to 55, everything should be wrapped in an "else" case which is connected to the "if" on line 22. The reason is that we only want these actions if the user is authenticated. If not, we will just navigate him to the login page. Also, on line 32, I switched context.stateUser.user.sub to context.stateUser.user.id, and now I don't receive undefined, but rather a proper id from params.
To add to this... on checkout.js line 30 should change to setUser(context.stateUser.user.userId) for the user specific items to render on the UI.
I was able to setup and install both the easy-shop and the backend. I was able to register but whenever the get is fired off (after register and login), I get the error:
[Unhandled promise rejection: Error: Request failed with status code 401]
It looks like it is happening on the return from the login. After I login the user id that is passed to the get is undefined.
Are there updates to the code to fix this?
Also, I can see my console logs on the back end but I do not see any console logs on the front end. Can you tell me where these logs are written so that I can look at them?
The text was updated successfully, but these errors were encountered: