-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Auth: Handle invalid account #2865
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
base: master
Are you sure you want to change the base?
Conversation
play-services-core/src/main/kotlin/org/microg/gms/accountaction/ErrorResolver.kt
Outdated
Show resolved
Hide resolved
Nice! Great to see this fixed 😭😭😭 |
Co-authored-by: Lucas <[email protected]>
Co-authored-by: Lucas <[email protected]>
Co-authored-by: Lucas <[email protected]>
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.
Many thanks for implementing this feature. However, as a regression, the UserSatisfyRequirements
resolution feature no longer works with these changes.
play-services-core/src/main/kotlin/org/microg/gms/accountaction/AccountActionActivity.kt
Outdated
Show resolved
Hide resolved
play-services-core/src/main/kotlin/org/microg/gms/accountaction/ErrorResolver.kt
Outdated
Show resolved
Hide resolved
<string name="auth_action_reauth_notification_title">Account issue detected</string> | ||
<string name="auth_action_reauth_notification_content">There is an issue with your account (%1$s). Please perform relevant actions.</string> | ||
<string name="auth_action_reauth_notification_re_login">Log in again</string> | ||
<string name="auth_action_reauth_notification_remove_account">Remove account</string> |
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.
From my personal perspective on UX, the notification content should be very short (on my screen the last few words are cropped off). To achieve this, I would not include the email address again as it is already shown in the notification subtext. Additionally, rather than "issue detected", I would use something more actionable (the other type of notification uses "Account action required", which could fit here as well). "Relevant actions" is also not very specific – are there cases where the flow will do anything other than ask for user's credentials?
If I remember correctly, the notification Google Play services uses talks about "entering your password again". I propose the following texts:
<string name="auth_action_reauth_notification_title">Account issue detected</string> | |
<string name="auth_action_reauth_notification_content">There is an issue with your account (%1$s). Please perform relevant actions.</string> | |
<string name="auth_action_reauth_notification_re_login">Log in again</string> | |
<string name="auth_action_reauth_notification_remove_account">Remove account</string> | |
<string name="auth_action_reauth_notification_title">Signed out of account</string> | |
<string name="auth_action_reauth_notification_content">Please sign in again to keep using your account.</string> | |
<string name="auth_action_reauth_notification_re_login">Sign in again</string> | |
<string name="auth_action_reauth_notification_remove_account">Remove account</string> |
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.
It is necessary to remind users which account is invalid, as different apps will use different accounts. However, the reminder text has been simplified.
play-services-core/src/main/kotlin/org/microg/gms/accountaction/Resolution.kt
Outdated
Show resolved
Hide resolved
play-services-core/src/main/kotlin/org/microg/gms/accountaction/AccountActionActivity.kt
Outdated
Show resolved
Hide resolved
One thing I noticed is that reauth is not possible if Android ID has changed (i.e. when microG data has been deleted, but accounts were kept). This should be relatively easy to fix, but I don't think it needs to be solved in this PR. 🙂 |
When testing this PR, I removed some specific devices from the Security tab in myaccount. A few days later, unrelated to this PR, I was not able to sign in (or reauth) from microG until I changed Android ID; perhaps the device was locked out in a way microG is unable to recover from? The server response was only a generic error. |
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.
Thanks for the improvements. Reauth and enterprise setup both work at the same time now. 👍
I'm not entirely happy with the UI choices made for the notification, but that's for @mar-v-in to decide.
#2731 (comment)
Based on @fynngodau’s solution, use notifications to inform users whether their account has expired. Users can choose to log in again or log out.
Choosing to re-login will be handled based on the newly added reauth interface.