-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Support remote first time log in #6380
Comments
Adding to 3.10.0 for consideration. |
It would be relatively simple to add a property to a user to force them to change their password next time they log in and it's a great security feature in general. It's also one step towards a "forgot my password" implementation which would automatically send a generated password and then require the user to reset on first use. The way I envisage this is to add a second step to the login page. When given the correct credentials, before establishing the CouchDB session, prompt the user to enter a new password twice. Then update the password, establish the session, and redirect to the app as per usual. As well as prompting users to change their password we should also include an expiry date on the generated password as it can easily be intercepted. Usually this is 24 hours but it may need to be longer in our case to give users enough time to find an internet connection and log in. |
@n-orlowski What are your design thoughts on password strength for this flow? I know CHW users have struggled historically with symbols like underscore, and different types of brackets. Are our existing password strength guidelines appropriate/clear and if so, how do we imagine messaging to overcome any educational hurdles so users understand "strong passwords"? |
@kennsippell TBH I haven't thought about this! How does this process happen currently? Based on the strength guidelines is there a way we can guide a strong password, for example suggesting a @garethbowen would it be possible to use a password token so users don't have to input a generated password and go straight into creating their own? Or do we know if users are familiar with copy and pasting? |
Making suggestions goes against best practice because even if a malicious actor doesn't know that information, they know it's likely to be in the format of five numbers, two letters, and two numbers, which makes it much more guessable. One thing we could do is include a password generator which generates a secure, pseudo random password, that's easy to type on a smartphone.
Is this use case for browser or android app based users? If this is for browser only users we could include the user and pass in the URL being sent to them so it prepopulates and submits the login form? eg: If it's for smartphone users it's harder. What do you mean by token here? How would the token be easier to use than a user and pass?
I doubt many users are comfortable with copying on smartphone. |
This sounds ideal! I was thinking a token but within the browser.. Envisioning a unique link gets sent out that is valid for a certain amount of time that lets users type in their new password without having to type our generated version but having a pre-populated form works just as well |
Deprioritised by request from @n-orlowski |
Hi team, see latest iteration on this flow:
Also included are affordances for expired temporary passwords, forgotten passwords, and forgotten passwords where the recovery number may be shared between CHWs. As always, please let me know about any feedback ✌️ |
This UX is great! What would a user see at each step if they lose connectivity? |
It'll all be cached by the service worker so they will see the page and we can show a helpful error when they try and submit the form. |
Received feedback that the temporary password flow may be too complicated for CHWs and have iterated to simplify using a magic link:
|
This is ready for development. Feel free to pick it up! |
Some work has been done towards implementing the PIN for added security in #3237 . Use that as a starting point and then it can be UATed and closed at the same time as this one. |
Ready for AT. Read through the documentation PR here: medic/cht-docs#220 |
Addendum to the AT instructions: In order to enable the Android intent (allowing app links to open in the medic-android app) in the unbranded version, you need to update the code before build, setting your host in the settings:
example branded: https://github.com/medic/medic-android/blob/6380-token-login/src/hope_through_health/res/values/strings.xml#L4 Also, make sure you're building medic-android from |
Thanks @dianabarsan for the added notes. It looks good now.
and Message can be retrieved from |
Sorry @dianabarsan - Was too quick to move this to ready to merge. Since it is a new feature and an important one for that, I have asked @n-orlowski to give it a final look and try different use cases/scenarios/error messages etc and give us feedback. |
@n-orlowski I think we definitely could improve on error messages. Not sure how much info we can get from the phone, but it would be a good think of ways check for things like no app installed, wrong version of the app, expired link, etc and ask the user to take appropriate action like download the app, upgrade, contact admin (assuming they are supposed to know how to as @n-orlowski mentioned). Your thoughts @dianabarsan ? |
@ngaruko can you list out the different error scenarios that were covered as part of AT, and show what the results were? |
We send 2 sms, one that contains the token-login link (so we don't risk the sms app splitting the link between messages and becoming unclickable) and one that should contain instructions for the user - which is configurable via As for other errors, I don't want to flood the issue with print screens :) so I'm linking to the translations that are used in the "landing page". |
I guess the last one is a quick fix @dianabarsan . The rest are edge cases, and if the user is familiar with the app and their phone, and the onboarding process/training is done properly, it should be too much of a pain. Your thoughts @abbyad @n-orlowski ? |
Best practice is actually to not use asterisks for the required field but to use an "Optional" label for those that are not required, so I think the last item is fine :) |
Thanks @n-orlowski and @dianabarsan . Since the core feature works and most of the rest is configurable, I think we can close this and leave it to the app services to configure as they see fit. |
When any link that has the same scheme and host as the branded flavor is clicked on the device, the user will have the option to open the link in the medic app. medic/cht-core#6380
- users update/create API accepts a new parameter called `token_login` that enables or disables the feature for a user - when this feature is enabled, the user can only login by accessing a link that is sent to them by SMS. This link will log them in automatically without the need of entering other credentials. Regular login is not possible because nobody knows the user's actual password. - generated tokens are valid for 24 hours - tokens can be regenerated - in this case the old token becomes invalid. #6380
Merged! |
When any link that has the same scheme and host as the branded flavor is clicked on the device, the user will have the option to open the link in the medic app. medic/cht-core#6380
When any link that has the same scheme and host as the branded flavor is clicked on the device, the user will have the option to open the link in the medic app. medic/cht-core#6380
When any link that has the same scheme and host as the branded flavor is clicked on the device, the user will have the option to open the link in the medic app. medic/cht-core#6380
We need a way to provide usernames and passwords for initial user log in for remote user onboarding. Not exactly sure how this can be done securely as we will likely need to send out login instructions via SMS. A potential solution could be to force users to reset their password on login but open to other suggestions!
We'll also need an affordance for lost or forgotten passwords.
The text was updated successfully, but these errors were encountered: