punchcard
punchcard copied to clipboard
Content Creator: Failed Login view
This is the view for when a failed login happens, and the alert message that will be displayed.
Feature: Failed Login View
As a Content Creator,
I want to be alerted when my attempt to log in fails
So that I am able to understand and fix the issue.
Scenario: Display alert message
Given I am trying to log into the CMS
When I go to enter my email and password
And what I enter is incorrect
Then I will receive an alert message explaining the issue
Scenario: Receive instructions
Given I am trying to log into the CMS
When I go to enter my email and password
And what I enter is incorrect
Then I will receive instructions on how to fix the error
Failed Login View:
- [ ] Display alert message
- [ ] Receive Instructions
@joshkimmell @scottnath @poofichu @mkiang3051 - This story should be ready for review. 🎱
@ineedsubstance Updated with moar scenarios.
🎱 🎱
@ineedsubstance: Break out reset password and create a new story.
@joshkimmell @scottnath - I assumed that's what this story was for: https://github.com/punchcard-cms/punchcard/issues/148
@ineedsubstance to create implementation story for @scottnath
Not going to have time for this during this sprint. Moving back to backlog.
@scottnath + @Snugug:
I explored the documentation for passportjs to see what was possible when it comes to messaging. I wanted to post those findings first before I moved forward to make sure I was heading down the right path.
Passport uses flash messages to display status information to the user. In our case, we want to display a failed message when the user tries to log in and the information is incorrect. In order to make this work, we need to call this feature by using failureFlash: true and then set the specific message like this passport.authenticate('local', { failureFlash: 'Invalid username or password.' });. This would also require using the connect-flash middleware plugin to provide that functionality.
Alternatively, I found someone that seemed to be using a different approach here. I quickly tried to implement this but was not successful.
Before I continue down a path, I wanted to check in with you guys to see what you thought.
This seems like the right path, but see if you can avoid flash. We removed it from our stack as we found it less flexible than using session directly
👌