-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/enhance-registration-login-flow (#1140)
# Feat: Enhance Registration and Login Flows ## JIRA Ticket [BSS-313](https://jira.csiro.com/browse/BSS-313) ## Description Overall goal is to provide a more seamless registration workflow for new users invited to a notebook. Will also try to improve the overall login experience. ## Proposed Changes - [x] Modify the login flow to use redirects back to the app rather than pop-up windows (on web) - [x] Use redirect on mobile back to a custom URL scheme to make login more seamless - [x] Make registration use the redirect scheme as well so that it can be used from in app - [x] Change registration invite ids to short codes - six character codes with a fixed prefix (BSS-123-ABC) so that they can be entered by hand - [ ] Invite codes should be fixed for each role in the notebook rather than being generated on demand - [x] Add QR code scan option from in the app to register for a notebook - [x] Add option to enter short-code in app to register for a notebook - [x] Tidy up login for Conductor web interface so that it works with new redirect scheme ## How to Test Add configuration to the api: ```javascript CONDUCTOR_SHORT_CODE_PREFIX="DEV" ``` You'll need to be running both the api and the app to test. On the app do a 'Wipe and Reset Everything' from About Build to clear local databases. ### Conductor - Login to conductor should be as before but instead of being taken to the 'send-token' page you should go to the home page after login. The return to app button is removed. ### Login/logout - Go to the conductor (API) URL and make sure you are not logged in - In the app, click 'Sign in" on the login page, you will be redirected to Conductor to login, once login is successful you will be redirected back and should be properly logged in - Check that the username is shown in the top right. Note that the menu is now gone and the button just links back to the sign-in page - Logout from the app, you may notice a quick redirect but it should log out as before, however now you are also logged out from conductor (visit the conductor URL to verify) ### Short code registration - In Conductor, select a notebook and generate an invite, select a user role (eg. admin) - Copy the short code that is generated, note the prefix (as configured above) - Logout of conductor - In the app, enter the six character short code (without prefix), click Register - You should see the registration screen, enter account details to make a new account - Once you submit, you should be redirected back to the app and (after a delay) the notebook should be available to you - Enter a random string of characters and you should get an error page from conductor with a button to return to the app ### QR Code registration This is only available on Android or IOS - As before, generate an invite for a notebook, this time display the QR Code - In the app, select 'Scan QR Code' from the sign in page - Scan the QR code, it should take you to the registration page or if already logged in, just make the notebook available - Scan a random QR code/barcode and you should get an error message ## Checklist - [x] I have confirmed all commits have been signed. - [x] I have added JSDoc style comments to any new functions or classes. - [x] Relevant documentation such as READMEs, guides, and class comments are updated.
- Loading branch information
Showing
56 changed files
with
1,059 additions
and
777 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.