Open rade98 opened 5 years ago
Anyone?
same problem here =(
I do not know why but when I copied the static files from the repository it worked, except this line in Alert.js
should look like this:
export default connect(mapStateToProps)(withAlert()(Alerts));
@linneudm . Try to use the alerts version used in the tutorial.The latest version is not compatible with the code . or you can also try react-toastify
Try console.log(Object.Keys(res)) . It will give all the keys of an object. If you don't find data key, then can you send the link of the repository
@rade98 @linneudm any success with figuring this out? I'm having the same issue.
@kaloster @linneudm @rade98 After a couple of weeks blocked in the same step, I found the solution. Basically the problem is related to a wrong spelling of the variables. Please do the following:
Check carefully how you've spelt the auth.isAuthenticated
variable inside your PrivateRoute.js
. In my case, It was set as auth.IsAuthenticated
so when the custom router decides if render your current component or redirect you to the /login
page it will do the second due to there isn't any auth.IsAuthenticated
attribute so !auth.IsAuthenticated
is true
and it will constantly go back and forth because probably in your Login.js
conditional statement is correctly declared.
Hi, I'm having some problems with frontend authentication. I'm following all the steps from videos, and until now everything worked well. But now I have issues with login. When I give invalid username/password I can see in redux extension 'LOGIN_FAIL' but when I log in with an actual account I don't see 'LOGIN_SUCCESS'. In console I see
I tried to console.log(res) even console.log(res.data) everything looks fine. Why is that? Here is my auth.js
I even have downloaded this code, I was checking all of this, even replacing with your code but I got the same error, maybe it's not a problem with auth.js?