Give Feedback While Logging In

From @jayair on Mon Apr 10 2017 01:04:36 GMT+0000 (UTC)

Link to chapter - http://serverless-stack.com/chapters/give-feedback-while-logging-in.html

Copied from original issue: https://github.com/AnomalyInnovations/serverless-stack-com/issues/43

I’m having an issue which has surfaced since I implemented the check for current session, my application throws an error when trying to check the session:

TypeError: Cannot read property 'currentSession' of undefined

I’ve checked the documentation on AWS Amplify but it seems to recommend different methods of doing the authentication, any idea where I may have gone wrong?

Does this happen when your app loads? Also, can you show me after which step in the tutorial does the problem show up?

Hey mate I worked out my issue just this morning, I had to recreate my user pool as the old one was causing issues the new one is working fine with identical setup

1 Like

Great! Thanks for reporting back.

Hello!
First of all: Great tutorial! One of the best I’ve read so far.
I found a little bug tho, when you implement the loading state you don’t handle the incorrect username / password error so the button keeps spinning indefinetly.
How should we handle that?
Thank you so much!

Sorry I forgot a line when the login fails! I apologize :slight_smile:

1 Like

Thanks for reporting back.

Just wanted to say what a great tutorial this is. I have been going to a bootcamp and you are one of the additional resources that I use. It’s been great. Keep it up!!

1 Like

That’s awesome! Thanks for the kind words!

Hi,

Great tutorial so far, it would be a great addition in the guide to add how to handle incorrect details response. With the current code it only caters for a successful request. If it is incorrect the button does not handle unsuccessful request causing it to be disabled without being able to exit Logging in animation. :slight_smile:

Yeah we definitely need to add more detail on that. It’ll most likely be an “extra credit” chapter, so we don’t overload first time readers.