Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Reset Password (from Forgot Password flow) cms and page #1220

Closed
Xymmer opened this issue Feb 6, 2019 · 8 comments
Closed

Add Reset Password (from Forgot Password flow) cms and page #1220

Xymmer opened this issue Feb 6, 2019 · 8 comments
Assignees
Labels
FR1 phase 1 of an epic

Comments

@Xymmer
Copy link
Contributor

Xymmer commented Feb 6, 2019

master ticket: #349

  • determine/update how the send reset password link is sent through email template that points to spartacus (I assume it's a combination of token + spartacus url inserted into email)
  • add cms page for 'reset password' page, if it's not already there
  • implement reset password page (button should be just 'reset password' not 'my'
    image

Acceptance criteria:

  • i go through forgot password flow and get a link
  • clicking the link goes to reset password page (i should not be logged)
  • the password form behaves like when we enter a password when registering
  • button activates when password meets min criteria and they match
  • submitting successfully redirects to the login page and displays a success message: "Success! You can now login using your new password."
@Xymmer Xymmer added this to the ALPHA-0 milestone Feb 6, 2019
@Xymmer Xymmer added this to To Do in Gladiators SPRINT via automation Feb 6, 2019
@Xymmer Xymmer added the FR1 phase 1 of an epic label Feb 6, 2019
@Xymmer
Copy link
Contributor Author

Xymmer commented Feb 8, 2019

note there is an issue with being able to reset the password without knowing the old password, we're investigating. Separate last bullet of acceptance criteria (being able to submit successfully) if required.

@tobi-or-not-tobi
Copy link
Contributor

  • we do not longer have page controlling logic, it's all done in components
  • the page that is used to reset the password will be hardcoded for now
  • the UpdatePasswordComponent is used both for requesting the reset password, as well as for setting it (just because it's the case right now).
  • we already have a content page for Update Password, with the page-label updatePassword

image

To further decouple, we should consider additional changes in the future:

  • provide a (backend) configuration for the loginPage, requestResetPasswordPage, resetPasswordPage,
  • make all content of those pages cms driven (i.e. paragraph components, link components)

@WeizhengSap WeizhengSap self-assigned this Feb 11, 2019
@WeizhengSap WeizhengSap moved this from To Do to In Progress in Gladiators SPRINT Feb 11, 2019
@WeizhengSap WeizhengSap moved this from In Progress to To Do in Gladiators SPRINT Feb 12, 2019
@WeizhengSap WeizhengSap moved this from To Do to In Progress in Gladiators SPRINT Feb 12, 2019
WeizhengSap added a commit that referenced this issue Feb 13, 2019
@WeizhengSap
Copy link
Contributor

This ticket is blocked by #1270 and https://jira.hybris.com/browse/RAY-239.
What I have done is:

  1. create some email render template for site "electronics-spa".
  2. create "reset password" cms page in "electronics-spa", and add one JspIncludeComponent "resetPassword". (This component will be replaced by a FlexCmsComponent when Config mapping for "FlexCmsComponent" (from 986) #1270 is done.)
  3. remove "reset password" page and layout from SPA.
  4. add cmsComponent config "ResetPassword", so this JspIncludeComponent can be found.

@WeizhengSap
Copy link
Contributor

WeizhengSap commented Feb 13, 2019

This is the email body we get (of course, the token is expired). You should be able to click the link then go to "reset password" page.

new.html.zip

screen shot 2019-02-13 at 12 13 46 pm

@WeizhengSap
Copy link
Contributor

WeizhengSap commented Feb 20, 2019

@WeizhengSap
Copy link
Contributor

WeizhengSap commented Feb 21, 2019

To code reviewer/tester:

The steps to make it work are:

  1. uninstall the spacceleratorsampleaddon, and reinstall it
ant addonuninstall -Daddonnames="spacceleratorsamplesaddon" -DaddonStorefront.yacceleratorstorefront="yacceleratorstorefront"
ant addoninstall -Daddonnames="spacceleratorsamplesaddon" -DaddonStorefront.yacceleratorstorefront="yacceleratorstorefront"
  1. replace the mail settings into local.properties (inside hybris/config)
mail.smtp.server=smtp.gmail.com
mail.smtp.port=587
mail.smtp.user=spa.gladiators@gmail.com
mail.smtp.password=hybris2019!
mail.use.tls=true

Or you can use Patrick's http://mockmail.plabadie.com/ to do it. Contact @plabadie for how to set it up.

  1. rebuild the system, and start the hybris server

  2. initialize the system

  3. Go to forgot password page, then enter a valid user password.

  4. You should able to get the email after a few seconds.

  5. Click the link inside the email, you should see "reset password" page open. Enter new password.

  6. We don't have the occ endpoint for "reset password". The the new password is not really reset. You should see the token and new password in browser's console.log.

  7. You should be able to see the success message, and you are redirect to login page. But, you cannot login using your new password.

@WeizhengSap WeizhengSap moved this from In Progress to Peer Review in Gladiators SPRINT Feb 21, 2019
@WeizhengSap WeizhengSap removed their assignment Feb 21, 2019
@plabadie plabadie assigned plabadie and WeizhengSap and unassigned plabadie Feb 21, 2019
@WeizhengSap WeizhengSap assigned plabadie and unassigned WeizhengSap Feb 22, 2019
WeizhengSap added a commit that referenced this issue Feb 22, 2019
WeizhengSap added a commit that referenced this issue Feb 22, 2019
WeizhengSap added a commit that referenced this issue Feb 22, 2019
WeizhengSap added a commit that referenced this issue Feb 25, 2019
* feature/GH-1220: change the route path for reset password

* feature/GH-1220: remove reset-new-password page

* feature/GH-1220

* feature/GH-1220: add reset password function in user service

* feature/GH-1220: add reset password effect

* GH-1219: Hook up the forgottenpasswordtokens endpoint to the UI

* GH-1219: Added facade doc.

* feature/GH-1220: add tests for reset password

* feature/GH-1220: change the reset password success message

* GH-1219: Fix tests.

* GH-1219: Call occ service from an effect.

* GH-1219: Fix formating.

* GH-1219: Fix unit test.

* GH-1219: Refactor the forgot password component and page completely CMS driven.  Use the new forgotPassword CMS page.

* GH-1219: Fix Imports and capitalize ForgotPasswordComponent.

* GH-1219: Fix form validation message not displaying.

* GH-1219: Fix field validations

* GH-1219: Clean up UserService facade tests.

* GH-1219: Added spec for forgot password actions.

* GH-1219: Add unit test for user facade.

* GH-1219: Add unit test for forgot password effect.

* GH-1219: Add test for the forgot password email request function in OccUserService

* GH-1219: Code cleanup.

* GH-1219: Improved test labels..

* GH-1219: Update the for behaviour to match the new UX guidelines.

* GH-1219: Remove the for header.

* GH-1219: Added unit tests for the forgot password component.

* GH-1219: Rename userId field to userEmail

* GH-1219: Rename reset-pasword component to forgot-password component to distinguish it from the component that actually resets the password.

* GH-1219: Improve unit tests.

* GH-1219: Fixed a typo.

* GH-1219: Remove the store from the tests.

* GH-1219: Create a forgot passaword module.

* feature/GH-1220: rename reset-new-password to reset-password

* feature/GH-1220

* feature/GH-1220: add reducer and selelctor for reset-password

* feature/GH-1220: add function to check whether user password is succesfully reset

* feature/GH-1220: refactor the reset password component

* feature/GH-1220: fix reset-password-form.component test

* feature/GH-1220: add more tests to reset-password-form.component.spec

* feature/GH-1220: address pr comments

* feature/GH-1220

* feature/GH-1220: fix failed tests

* feature/GH-1220

* feature/GH-1220: remove console log
@WeizhengSap WeizhengSap moved this from Code Review & Local QA to Done in Gladiators SPRINT Feb 25, 2019
@Xymmer Xymmer closed this as completed Feb 27, 2019
@Xymmer Xymmer modified the milestones: ALPHA-0, 1902-27 (0.1.0 pre-alpha) Feb 27, 2019
@Xymmer Xymmer removed this from Done in Gladiators SPRINT Feb 27, 2019
@Xymmer Xymmer added this to Gladiators in Accepted 1902-27 via automation Feb 27, 2019
@KateChuen
Copy link
Contributor

KateChuen commented Mar 25, 2019

  1. determine/update how the send reset password link is sent through email template that points to spartacus (I assume it's a combination of token + spartacus url inserted into email)
  1. add cms page for 'reset password' page, if it's not already there
    implement reset password page (button should be just 'reset password' not 'my'
  • Button is reset password.
    ResetPwdButton
  1. i go through forgot password flow and get a link
  • This is the email received:
    forgotPwdEmail
  1. clicking the link goes to reset password page (i should not be logged)
  • Even if I was previously logged in, clicking on the link goes to reset password page and no user is logged in.
  1. the password form behaves like when we enter a password when registering
    button activates when password meets min criteria and they match
    submitting successfully redirects to the login page and displays a success message: "Success! You can now login using your new password."
  • The "Reset Password" button is active before the password meets the criteria. However, a validation is done when clicked on it.
    resetPwdButtonActive

  • Successfully submitting the new password redirects user to the login page and with the correct success message.
    successMsg

  1. We don't have the occ endpoint for "reset password". The the new password is not really reset. You should see the token and new password in browser's console.log.
  • Can see token and new password in console.
    NewPwdLog
  1. You should be able to see the success message, and you are redirect to login page. But, you cannot login using your new password.

@plabadie
Copy link
Contributor

plabadie commented Mar 25, 2019

For point 5, For the submit button, we followed the form behaviour requirements described in the Wireframes: https://98qkkl.axshare.com/#g=1&p=main_action_on_form_pages
The ticket description should have been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR1 phase 1 of an epic
Projects
No open projects
Accepted 1902-27
  
Gladiators
Development

No branches or pull requests

5 participants