ecency / ecency-mobile

Ecency Mobile - reimagined social blogging, contribute and get rewarded (for Android and iOS)
https://ecency.com
MIT License
233 stars 69 forks source link

Nt/account switch fix #2689

Closed noumantahir closed 1 year ago

noumantahir commented 1 year ago

What does this PR?

After testing a number of scenarios and trying to recreate the environment being faced by users, added a bunch snippets to help avoid embarrassing situations

1 - purges malformed accounts 2 - logs out of app instead of logging into malformed account 3 - rearranged logout structure to avoid creating an undefined auth data state 4 - moved isLogingOut state to uiReducer so it gets reset on every app launch if routine is interupted for some reason

Screenshots/Video

showing toast when auto detecting malformed user data detected on launch and when switching to logged in user after logging out Screenshot 2023-05-24 at 5 51 40 PM

showing logout prompt if invalid account detected regular account switch Screenshot 2023-05-24 at 5 54 35 PM

refine text button account switch sheet Screenshot 2023-05-24 at 6 07 23 PM

using in app action modal instead of OptionsModal Screenshot 2023-05-24 at 6 07 31 PM

noumantahir commented 1 year ago

Added account verification mechanism on startup, account switch and logout if malformed keys data is detected. instead of wiping account data without notice, app now asks to verification and assist with prefilled username