-
Notifications
You must be signed in to change notification settings - Fork 136
[REST API] Log user out if user is unauthorized to generate application password #8222
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
Conversation
|
You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code: |
Codecov ReportBase: 43.44% // Head: 43.59% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## trunk #8222 +/- ##
============================================
+ Coverage 43.44% 43.59% +0.15%
- Complexity 3533 3584 +51
============================================
Files 713 720 +7
Lines 37954 38295 +341
Branches 5014 5051 +37
============================================
+ Hits 16489 16696 +207
- Misses 19993 20103 +110
- Partials 1472 1496 +24
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Hey @hichamboushaba Nicely done! |
|
Question: Should we inform users about this, perhaps at least show a Toast? They might be in the middle of a pretty big task (e.g. updating a product) and might want to know why they're suddenly signed out. |
Good point @hafizrahman, but if it's OK with you, let's leave it for another PR, the error might be triggered multiple times if multiple calls were made, but we need to make sure the
@JorgeMucientes the error should be triggered by API calls, so if you try to refresh orders or products, it should be triggered without having to restart the app, can you check again? 🙏 |
|
Hey @hichamboushaba 👋🏼 In this first scenario I log in using site credentials and revoke the app password as well as I change the user password: revokeAppPasswordAndResetPassword.movIn this other scenario I only revoke app password. Everything seem to be working fine, the app is able to recover and generate another App password. But then notice at the end of the video I revoke again the app password without changing the user password and I'm instantly logged out from the app: revokeAppPasswordOnlyTrimmed.movAnd finally, I also experienced this rare behaviour right when I'm logged in, requests start failing and I'm automatically logged out, even when password was correctly generated: loggedOutAfterLogin.movI'm the only one experiencing this weird behaviors? 😅 |
|
Thanks so much @JorgeMucientes for the videos, they are very helpful.
The difference here is that we don't have a cached
I can't reproduce these scenarios, in the videos I see some |
50ee8fd to
e22f113
Compare
e22f113 to
f96ebbc
Compare
| <argument | ||
| android:name="customUrl" | ||
| app:argType="string" | ||
| android:defaultValue="@null" | ||
| app:nullable="true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new argument was added in the commit 4eeb55a, but it was added only in the main_nav_graph.
Given that this destination is declared in two navgraphs, we need to make sure the arguments are kept in sync, otherwise the build fails randomly (like this build), this is a known bug, and we faced it before p1646845001099659-slack-C6H8C3G23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @samiuelson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch, sorry for letting the bug in. Thank you for fixing this @hichamboushaba!
Generated by 🚫 dangerJS |
|
Thanks for looking into the possible issues shown in the videos @hichamboushaba. |
Closes: #8221
Description
This PR simply monitors the application password generation failures, and log the user out when a failure due to a
401error happens.Testing instructions
RELEASE-NOTES.txtif necessary.