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

UX + Security current user password reset #5042

Merged
merged 7 commits into from
Apr 18, 2019

Conversation

coolaj86
Copy link
Contributor

@coolaj86 coolaj86 commented Oct 7, 2018

Follow up to #5034

I'll annotate these a little later, but it's combos for these states:

  • not logged in
  • logged in as expected user
  • logged in as an unexpected user
  • valid code
  • invalid code (or expired code)

Default Condition

  • Not logged In
  • Valid Reset Code

Result

  • Shows email of user for whom the password is to be reset
  • Shows "Remember me"
  • Signs in the user

screen shot 2018-10-07 at 11 15 55 am

Logged In

  • Already Logged In
  • Valid Reset Code

Result

  • Shows email of user for whom the password is to be reset
  • Doesn't show "Remember me"
  • Renews user session

screen shot 2018-10-07 at 11 15 31 am

Invalid Code

  • Login Status N/A
  • Invalid Code

Result

  • Error about invalid code
  • Submits to same error page (could probably just disable submit)

screen shot 2018-10-07 at 11 14 22 am

Invalid User

  • User Logged in as FOO USER
  • Valid Code for BAR USER

Result

  • Error about mismatch user
  • Submits to same error page (could probably just disable submit)

screen shot 2018-10-07 at 11 13 35 am

screen shot 2018-10-07 at 11 13 49 am

@coolaj86 coolaj86 force-pushed the ux-current-user-password-reset branch 2 times, most recently from c483c86 to f8cf890 Compare October 7, 2018 20:18
@codecov-io
Copy link

codecov-io commented Oct 7, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@fdb933c). Click here to learn what that means.
The diff coverage is 8.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5042   +/-   ##
=========================================
  Coverage          ?   41.66%           
=========================================
  Files             ?      414           
  Lines             ?    55985           
  Branches          ?        0           
=========================================
  Hits              ?    23327           
  Misses            ?    29529           
  Partials          ?     3129
Impacted Files Coverage Δ
models/mail.go 23.93% <0%> (ø)
routers/routes/routes.go 81.99% <100%> (ø)
routers/user/auth.go 13.08% <5.26%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdb933c...1688720. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 7, 2018
routers/user/auth.go Outdated Show resolved Hide resolved
@lafriks lafriks added the type/enhancement An improvement of existing functionality label Oct 8, 2018
@lafriks lafriks added this to the 1.7.0 milestone Oct 8, 2018
Copy link
Member

@daviian daviian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm against auto-signin on password reset. Consequently I find having "Remember me" on Password reset awkward.

IMO we need a "password confirmation" field instead.
Showing Email is fine.

routers/routes/routes.go Outdated Show resolved Hide resolved
@coolaj86 coolaj86 force-pushed the ux-current-user-password-reset branch from 4594723 to c8dcf9e Compare October 15, 2018 18:49
@coolaj86
Copy link
Contributor Author

coolaj86 commented Oct 15, 2018

@daviian The "Remember me" felt a little weird to me too.

What I came to was that it's actually the form was incorrectly labeled. "Password Reset" is the process that happens on the Account page. This process is actually "Account Recovery", which is a different user flow.

The user isn't coming to this page with the intent to change their password (that is already on the Account page), but rather to be able to login to their account. In this case, with the current configuration, that implicitly includes setting a password. However, once more secure options are available (such as simply omitting passwords if a mailer is configured) the user will still want to recover their account (i.e. their primary oauth is down and they can't log in) but a password won't be part of the process.

I'll post new screenshots a little later.

@coolaj86
Copy link
Contributor Author

Two more things that should change for increased clarity:

  • "New Password" instead of "Password"
  • "Remember this device" instead of "Remember me"

@stale
Copy link

stale bot commented Feb 17, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Feb 17, 2019
@techknowlogick techknowlogick modified the milestones: 1.8.0, 1.9.0 Feb 19, 2019
@stale stale bot removed the issue/stale label Feb 19, 2019
@coolaj86
Copy link
Contributor Author

I'm back on the scene. I'll see what I can do to get this stuff cleaned up and PR'd again.

@coolaj86 coolaj86 force-pushed the ux-current-user-password-reset branch from 9334293 to 3839984 Compare April 14, 2019 07:40
@coolaj86
Copy link
Contributor Author

Rebased and ready for re-review!

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 14, 2019
@@ -273,8 +273,6 @@ func RegisterRoutes(m *macaron.Macaron) {
}, openIDSignInEnabled)
m.Get("/sign_up", user.SignUp)
m.Post("/sign_up", bindIgnErr(auth.RegisterForm{}), user.SignUpPost)
m.Get("/reset_password", user.ResetPasswd)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to atleast redirect to the new route before this is finally removed in 1.10?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adelowo I don't see why as emails having old route won't be usable anyway as code is valid only for few hours

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha true... stupid me

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 14, 2019
@lafriks
Copy link
Member

lafriks commented Apr 14, 2019

@daviian need your approval

@lafriks lafriks merged commit 6dbd261 into go-gitea:master Apr 18, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants