Setting password via /setpassword signs in user. Does not generate re-authentication credentials.
See original GitHub issueIf you haven’t already, check out our contributing guidelines for onboarding!
view the job on Upwork here.
Platform - version:
Current
Problem
It doesn’t seem like we are generating re-authentication credentials when a user hits https://expensify.cash/setpassword/[validateCode]
.
Why is this important?
I think anyone setting a password will be logged out when their authToken expires. And ideally they won’t be logged out at all once a password is set.
Solution
Generalize the logic here into a private action that can be used in the signIn()
and setPassword()
flows.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Set-ADAccountPassword (ActiveDirectory) - Microsoft Learn
This command prompts the user for a new password that is stored in a temporary variable named $NewPassword, then uses it to reset...
Read more >Configure passwords for automatically created user accounts
When a user first accesses the instance with their new account, they must enter their user name and click on the Forgot Password?...
Read more >Change Users' Passwords - Auth0
This topic describes different ways to reset the password for a user in your database. You can change passwords for users in your...
Read more >Managing passwords for IAM users - AWS Documentation
Use AWS CLI or AWS API commands to create, change, or delete the password for an IAM user in your AWS account.
Read more >How can I save username and password in Git? - Stack Overflow
Attention: This method saves the credentials in plaintext on your PC's disk. Everyone on your computer can access it, e.g. malicious NPM modules....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Plan sounds good. We can reproduce an
authToken
expiring by modifying thelocalStorage
keysession
and deleting some characters fromsession.authToken
- tapping on a new chat or trying to take any API action should in this case not log you out but refresh the token instead.https://user-images.githubusercontent.com/32969087/108240312-d13e9900-70ee-11eb-8125-abd62723111d.mp4
For this issue I would refactor the functionality into a new function in the Session.js action file and call that from within the signIn and setPassword functions, making it re-usable and keeping the code DRY. This is to all setPassword to set up the re-authentication credentials for when the token expires without reproducing the code from the signIn action.
I would first try to re-produce the “authToken expiration after re-setting” edge case. I would then call then confirm the desired refreshing of auth tokens take place after the change.
How long lived are the tokens? Do you have any advice on how to re-produce this edge case on demand? Otherwise I would look at a way to force this to happen to speed the feedback loop up if the token lives longer than a few minutes.