A user story frames a requirement around the person who needs a capability and why they need it. Its persona, need, and purpose establish context; acceptance criteria then make concrete, verifiable aspects of that intent explicit. section 1.2
Listing 1.1 User story for password reset
As an account holder I want to reset my password So that I can regain control of my account if I suspect it has been compromised
A password-reset story connects the account holder’s need to the purpose of regaining control after a suspected compromise. section 1.2
Listing 1.2 Acceptance criteria password reset user story
Scenario: Resetting a password revokes existing access Given I am an account holder with one or more active sessions And I have requested a password reset When I successfully set a new password using the reset link Then all existing sessions for my account are invalidated And I must log in again on any device Scenario: A reset link is valid only for a limited time Given I have requested a password reset When I open the reset link within 30 minutes Then I am allowed to choose a new password Scenario: An expired reset link cannot be used Given I have requested a password reset When I open the reset link after 30 minutes Then the link is rejected And I am prompted to request a new one
Scenarios make the story’s intent verifiable, covering session invalidation and reset-link expiration. section 1.2








