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

Passwordless login and signup #3531

Merged
merged 64 commits into from Nov 23, 2023
Merged

Passwordless login and signup #3531

merged 64 commits into from Nov 23, 2023

Conversation

theskumar
Copy link
Member

@theskumar theskumar commented Aug 17, 2023

Fixes #ISSUEID

This PR is depended on #3521

  • Passwordless login
  • Passwordless signup
  • Allow user to set a password after going to profile.
  • Allow user to change their email even if they don't have an email set.
  • Allow user to add their name in the application form if name is not present in the user account.
  • Don't display "Dashboard" link if the user does't have permission to access to it.
  • Allow to use to setup 2FA without account password.
  • Display user content on the login screen, if configured (it is an existing feature)
  • If 2FA is enforced, allow the user to submit the application without setting up 2FA
  • Add email re-verification option to elevate, sudo mode, apart from password
  • Update landing page after application submission, on success it redirects now.
  • Update ENABLE_PUBLIC_SIGNUP and FORCE_LOGIN_FOR_APPLICATION to true by default

Login/Signup Flow

image

Updated Login Page with Registration Enabled

Screenshot 2023-09-13 at 07 53 06@2x

After providing the email ID

The messaging is kept neutral to hide if the user is already registered or not. The email will contain more detail, if the account exist or not.

Screenshot 2023-09-13 at 07 57 27@2x

Login email copy
Screenshot 2023-09-13 at 08 08 36@2x

Signup

New Account Email copy
Screenshot 2023-09-21 at 07 08 52@2x

Profile Page just after signup

The user after clicking on the signup link in the email is redirect to homepage. No dashboard is available as the user doesn't have applicant role. If they click on the "profile" button they see this page with open to update profile and setup a password and enable 2FA.

If the user decide to change the email, password is not asked if not password is set, instead an email is sent to authorize the email change.

Screenshot 2023-09-22 at 08 50 21@2x

Updated "Sudo" mode page

For account with password

Screenshot 2023-10-31 at 7  49 38@2x

After clicking on the "Send a confirmation code to your email" link

Screenshot 2023-10-31 at 8  03 28@2x

Screenshot 2023-10-31 at 7  51 03@2x

For account without password

Screenshot 2023-10-31 at 7  53 44@2x

Updated disable 2FA page

It requires "Sudo" mode, instead of password now.

Screenshot 2023-10-31 at 7  48 01@2x

@theskumar theskumar changed the title Passwordless login and signup WIP: Passwordless login and signup Aug 17, 2023
hypha/apply/users/views.py Fixed Show fixed Hide fixed
hypha/apply/users/views.py Fixed Show fixed Hide fixed
@theskumar theskumar force-pushed the feature/passwordless-login-signup branch from b617765 to 0565e79 Compare September 5, 2023 07:52
@theskumar theskumar force-pushed the feature/passwordless-login-signup branch from 5621bfc to ed14b24 Compare September 8, 2023 09:18
@theskumar theskumar force-pushed the feature/passwordless-login-signup branch from aebeb73 to b473f2c Compare September 12, 2023 09:21
@theskumar theskumar force-pushed the feature/passwordless-login-signup branch from 70f8231 to 250919e Compare September 13, 2023 08:13
@theskumar theskumar force-pushed the feature/passwordless-login-signup branch from 250919e to b9769ec Compare September 13, 2023 08:54
@theskumar
Copy link
Member Author

Sure. that sounds good. Just finalizing the sudo mode/confirm access without password. It will send a code/url in the email to confirm access and elevate the permission.

@theskumar theskumar force-pushed the feature/passwordless-login-signup branch 2 times, most recently from 9efed24 to 92e7871 Compare October 31, 2023 07:00
@theskumar
Copy link
Member Author

This is ready to testing now. Update the "Sudo" mode work without password.

Also, updated 2FA flows to not depend on the passwords. @frjo @wes-otf @Techslammer

Also update the 2FA flows to use 'sudo' mode

Update view backup_tokens url and urlname, remove password in it

The backup token uses elevate now, and would be possible to confirm access without password
@theskumar theskumar force-pushed the feature/passwordless-login-signup branch from 92e7871 to e1a5b74 Compare October 31, 2023 07:11
@theskumar
Copy link
Member Author

theskumar commented Oct 31, 2023

Updated description with screenshots

* main:
  Custom applicant dashboard header (#3587)
  Upgrade wagtail to 5x (#3627)
  Upgrade to Django 4.1.x (#3398)
  docs: update the links to images and some references to pages (#3641)
  Update the query text on all.html (#3638)
  Update to  django-3.2.23. (#3637)
@frjo
Copy link
Contributor

frjo commented Nov 7, 2023

Will put this on test after today's testing. This will be part of a very nice Hypha 5.1 release!

@frjo frjo added Status: Needs testing Tickets that need testing/qa Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter labels Nov 9, 2023
…login-signup

* origin/main:
  Fix visibility of last item of status bar on submission detail page (#3656)
  Update test duration file and locale files. Also lock Faker to v19.x.  (#3657)
Put forgot password along-side the password field
@theskumar
Copy link
Member Author

theskumar commented Nov 20, 2023

@frjo Updated the login with password screen so that the Forgot your password? is just below the password field.

Also, update the context text to be smaller/de-emphasized.

Screenshot 2023-11-20 at 7  17 43@2x

@frjo frjo merged commit cc56bdf into main Nov 23, 2023
10 checks passed
@theskumar theskumar deleted the feature/passwordless-login-signup branch November 24, 2023 17:32
wes-otf pushed a commit that referenced this pull request May 7, 2024
Fixes #ISSUEID

This PR is depended on #3521 

- [x] Passwordless login
- [x] Passwordless signup 
- [x] Allow user to set a password after going to profile.
- [x] Allow user to change their email even if they don't have an email
set.
- [x] Allow user to add their name in the application form if name is
not present in the user account.
- [x] Don't display "Dashboard" link if the user does't have permission
to access to it.
- [x] Allow to use to setup 2FA without account password.
- [x] Display user content on the login screen, if configured (it is an
existing feature)
- [x] If 2FA is enforced, allow the user to submit the application
without setting up 2FA
- [x] Add email re-verification option to elevate, sudo mode, apart from
password
- [x] Update landing page after application submission, on success it
redirects now.
- [x] Update ENABLE_PUBLIC_SIGNUP and FORCE_LOGIN_FOR_APPLICATION to
true by default

# Login/Signup Flow


![image](https://github.com/HyphaApp/hypha/assets/236356/91c22cb1-bd1f-4665-98e2-0350829a5807)


## Updated Login Page with Registration Enabled

![Screenshot 2023-09-13 at 07 53
06@2x](https://github.com/HyphaApp/hypha/assets/236356/424fa2f6-a519-44e3-a9ec-449815dd39b2)


## After providing the email ID

The messaging is kept neutral to hide if the user is already registered
or not. The email will contain more detail, if the account exist or not.

![Screenshot 2023-09-13 at 07 57
27@2x](https://github.com/HyphaApp/hypha/assets/236356/7577447b-edf2-496e-94ca-3c98a8f2f075)

Login email copy
![Screenshot 2023-09-13 at 08 08
36@2x](https://github.com/HyphaApp/hypha/assets/236356/ab2d3e90-da2e-40ec-9f7e-bbb8d9e7235f)

## Signup

New Account Email copy
![Screenshot 2023-09-21 at 07 08
52@2x](https://github.com/HyphaApp/hypha/assets/236356/cb14350b-1cfb-4869-b863-ebbb95701089)

### Profile Page just after signup 
The user after clicking on the signup link in the email is redirect to
homepage. No dashboard is available as the user doesn't have applicant
role. If they click on the "profile" button they see this page with open
to update profile and setup a password and enable 2FA.

If the user decide to change the email, password is not asked if not
password is set, instead an email is sent to authorize the email change.

![Screenshot 2023-09-22 at 08 50
21@2x](https://github.com/HyphaApp/hypha/assets/236356/7ed0cb97-a7ca-49fe-aef5-de8f3890db1e)


## Updated "Sudo" mode page

### For account with password

![Screenshot 2023-10-31 at 7  49
38@2x](https://github.com/HyphaApp/hypha/assets/236356/fe27ad75-7e4b-4226-89c1-ddd7a5548944)

After clicking on the "Send a confirmation code to your email" link

![Screenshot 2023-10-31 at 8  03
28@2x](https://github.com/HyphaApp/hypha/assets/236356/bf7a4098-fd0f-4d55-9850-0862da69d808)


![Screenshot 2023-10-31 at 7  51
03@2x](https://github.com/HyphaApp/hypha/assets/236356/3768e87f-d105-4d54-9cd6-2e2b8a81fa2f)


### For account without password

![Screenshot 2023-10-31 at 7  53
44@2x](https://github.com/HyphaApp/hypha/assets/236356/8c84181a-43ce-4afe-a5be-758e3f0e55f8)


## Updated disable 2FA page

It requires "Sudo" mode, instead of password now. 

![Screenshot 2023-10-31 at 7  48
01@2x](https://github.com/HyphaApp/hypha/assets/236356/2b5c8bd1-27ea-42cd-9c84-608bb351631c)
wes-otf pushed a commit that referenced this pull request May 8, 2024
Fixes #ISSUEID

This PR is depended on #3521 

- [x] Passwordless login
- [x] Passwordless signup 
- [x] Allow user to set a password after going to profile.
- [x] Allow user to change their email even if they don't have an email
set.
- [x] Allow user to add their name in the application form if name is
not present in the user account.
- [x] Don't display "Dashboard" link if the user does't have permission
to access to it.
- [x] Allow to use to setup 2FA without account password.
- [x] Display user content on the login screen, if configured (it is an
existing feature)
- [x] If 2FA is enforced, allow the user to submit the application
without setting up 2FA
- [x] Add email re-verification option to elevate, sudo mode, apart from
password
- [x] Update landing page after application submission, on success it
redirects now.
- [x] Update ENABLE_PUBLIC_SIGNUP and FORCE_LOGIN_FOR_APPLICATION to
true by default

# Login/Signup Flow


![image](https://github.com/HyphaApp/hypha/assets/236356/91c22cb1-bd1f-4665-98e2-0350829a5807)


## Updated Login Page with Registration Enabled

![Screenshot 2023-09-13 at 07 53
06@2x](https://github.com/HyphaApp/hypha/assets/236356/424fa2f6-a519-44e3-a9ec-449815dd39b2)


## After providing the email ID

The messaging is kept neutral to hide if the user is already registered
or not. The email will contain more detail, if the account exist or not.

![Screenshot 2023-09-13 at 07 57
27@2x](https://github.com/HyphaApp/hypha/assets/236356/7577447b-edf2-496e-94ca-3c98a8f2f075)

Login email copy
![Screenshot 2023-09-13 at 08 08
36@2x](https://github.com/HyphaApp/hypha/assets/236356/ab2d3e90-da2e-40ec-9f7e-bbb8d9e7235f)

## Signup

New Account Email copy
![Screenshot 2023-09-21 at 07 08
52@2x](https://github.com/HyphaApp/hypha/assets/236356/cb14350b-1cfb-4869-b863-ebbb95701089)

### Profile Page just after signup 
The user after clicking on the signup link in the email is redirect to
homepage. No dashboard is available as the user doesn't have applicant
role. If they click on the "profile" button they see this page with open
to update profile and setup a password and enable 2FA.

If the user decide to change the email, password is not asked if not
password is set, instead an email is sent to authorize the email change.

![Screenshot 2023-09-22 at 08 50
21@2x](https://github.com/HyphaApp/hypha/assets/236356/7ed0cb97-a7ca-49fe-aef5-de8f3890db1e)


## Updated "Sudo" mode page

### For account with password

![Screenshot 2023-10-31 at 7  49
38@2x](https://github.com/HyphaApp/hypha/assets/236356/fe27ad75-7e4b-4226-89c1-ddd7a5548944)

After clicking on the "Send a confirmation code to your email" link

![Screenshot 2023-10-31 at 8  03
28@2x](https://github.com/HyphaApp/hypha/assets/236356/bf7a4098-fd0f-4d55-9850-0862da69d808)


![Screenshot 2023-10-31 at 7  51
03@2x](https://github.com/HyphaApp/hypha/assets/236356/3768e87f-d105-4d54-9cd6-2e2b8a81fa2f)


### For account without password

![Screenshot 2023-10-31 at 7  53
44@2x](https://github.com/HyphaApp/hypha/assets/236356/8c84181a-43ce-4afe-a5be-758e3f0e55f8)


## Updated disable 2FA page

It requires "Sudo" mode, instead of password now. 

![Screenshot 2023-10-31 at 7  48
01@2x](https://github.com/HyphaApp/hypha/assets/236356/2b5c8bd1-27ea-42cd-9c84-608bb351631c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs testing Tickets that need testing/qa Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants