punchcard-cms / punchcard

The Punchcard CMS
Apache License 2.0
31 stars 19 forks source link

Content Creator: Failed Login view #225

Open ineedsubstance opened 8 years ago

ineedsubstance commented 8 years ago

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:

ineedsubstance commented 8 years ago

@joshkimmell @scottnath @poofichu @mkiang3051 - This story should be ready for review. 🎱

joshkimmell commented 8 years ago

@ineedsubstance Updated with moar scenarios.

joshkimmell commented 8 years ago

🎱 🎱

joshkimmell commented 8 years ago

@ineedsubstance: Break out reset password and create a new story.

ineedsubstance commented 8 years ago

@joshkimmell @scottnath - I assumed that's what this story was for: https://github.com/punchcard-cms/punchcard/issues/148

ineedsubstance commented 8 years ago

@ineedsubstance to create implementation story for @scottnath

ineedsubstance commented 8 years ago

Not going to have time for this during this sprint. Moving back to backlog.

ineedsubstance commented 7 years ago

@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.

Snugug commented 7 years ago

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

ineedsubstance commented 7 years ago

👌