sourcegraph/internal/auth
Namit Chandwani 528d98e0e3
feat: show current email during password reset and auto-populate text-box after successful completion (#59645)
## Linked Issues
- Closes https://github.com/sourcegraph/sourcegraph/issues/38348


## Motivation and Context:
<!--- Why is this change required? What problem does it solve? --> 
- Improves the UX of the password reset flow

## Changes Made:
<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->
- Made changes to the following 2 flows:
	- On the new password entry screen:
- Added a text which displays the email of the account for which the
password change request has been raised
- Added a back button to allow the users to go back to the previous
email entry screen if the account they want to reset the password for is
different
- On the sign-in screen which comes after successful password reset
request completion:
- Made changes to auto-populate the email text-box with the email linked
to the account on which the password reset request was completed
recently


## Type of change:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Refactoring (altering code without changing its external
behaviour)
- [ ] Documentation change
- [ ] Other


## Checklist:

- [x] Development completed
- [ ] Comments added to code (wherever necessary)
- [ ] Documentation updated (if applicable)
- [x] Tested changes locally


## Follow-up tasks (if any):

- None

## Test Plan
<!--- Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce. -->

- Setup the codebase locally along with configuring a custom SMTP to
enable the email delivery functionality with the help of this
documentation:
https://docs.sourcegraph.com/admin/config/email#configuring-sourcegraph-to-send-email-using-another-provider

 - Tested the entire flow locally end-to-end.
- Screen recording of the password reset screen where the current email
ID is added along with a back button:
	 	

https://github.com/sourcegraph/sourcegraph/assets/51479159/a79fc338-ace0-4281-86d2-de7cc68eae20
	 
- Screen recording of the sign-in screen after password reset is
successfully done where the email ID is auto-populated in the text-box:
	 	

https://github.com/sourcegraph/sourcegraph/assets/51479159/be7db65d-9421-4621-a1e9-a04a546b9757



    
## Additional Comments
- Please let me know if I need to make any further design changes from
the frontend side or any API contract related changes from the backend
side

---------

Co-authored-by: Vincent <evict@users.noreply.github.com>
Co-authored-by: Shivasurya <s.shivasurya@gmail.com>
2024-07-12 15:45:35 +01:00
..
providers bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
userpasswd feat: show current email during password reset and auto-populate text-box after successful completion (#59645) 2024-07-12 15:45:35 +01:00
backoff.go debt: extract a buncha stuff from cmd/frontend that was used outside of frontend (#52570) 2023-06-01 14:20:11 +01:00
BUILD.bazel fetch NamespaceSelector namespaces from GraphQL (viewer { affiliatedNamespaces }) (#63592) 2024-07-04 01:50:50 -05:00
const.go Backend: remove EnterpriseDB (#54699) 2023-07-06 20:03:31 -06:00
forbid_all_test.go debt: extract a buncha stuff from cmd/frontend that was used outside of frontend (#52570) 2023-06-01 14:20:11 +01:00
forbid_all.go debt: extract a buncha stuff from cmd/frontend that was used outside of frontend (#52570) 2023-06-01 14:20:11 +01:00
orgs.go Move auth check helpers out of cmd/frontend (#42624) 2022-10-06 12:22:02 +02:00
site_admin_test.go Separate database package mocks to dbmocks package (#55778) 2023-08-14 10:48:45 +02:00
site_admin.go tiny refactoring: remove duplicated auth code (#51770) 2023-05-12 16:08:56 +02:00
visitor.go fetch NamespaceSelector namespaces from GraphQL (viewer { affiliatedNamespaces }) (#63592) 2024-07-04 01:50:50 -05:00