Part of ENG-8137.
Addresses ENG-7215 on native.
Modified native_rust_library and native Identity client to use username received in AuthResponse message from login/registration RPCs.
Depends on D12127
Paths
| Differential D12134 Authored by bartek on May 20 2024, 11:01 PM.
Tags None Referenced Files
Details Summary Part of ENG-8137. Modified native_rust_library and native Identity client to use username received in AuthResponse message from login/registration RPCs. WARNING: We should first deploy Identity with D12127 before landing this diff. Otherwise, the Identity won't be sending username in responses and gRPC will default this to empty string, which potentially breaks all login / registration actions.
Depends on D12127 Test Plan Console.log the return value of processAuthResult() in login and register RPCs (both password and wallet). Confirmed that username is present.
Diff Detail
Event Timelinebartek held this revision as a draft. Herald added subscribers: tomek, ashoat. · View Herald TranscriptMay 20 2024, 11:01 PM2024-05-20 23:01:31 (UTC-7) bartek edited the summary of this revision. (Show Details)May 20 2024, 11:11 PM2024-05-20 23:11:54 (UTC-7) Harbormaster completed remote builds in B29077: Diff 40426.May 20 2024, 11:20 PM2024-05-20 23:20:50 (UTC-7) This revision is now accepted and ready to land.May 21 2024, 2:00 AM2024-05-21 02:00:16 (UTC-7) Closed by commit rCOMMb692fb3d2de3: [native] Process username received in AuthResponse (authored by bartek). · Explain WhyMay 23 2024, 11:28 PM2024-05-23 23:28:07 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 40426 native/identity-service/identity-service-context-provider.react.js
native/native_rust_library/src/identity.rs
native/native_rust_library/src/identity/login.rs
native/native_rust_library/src/identity/registration.rs
|
We definitely should return something from this lambda since otherwise it is useless to assign it to variable.
If we find that we don't have permissions then just calling await this.requestAndroidNotificationsPermission(); would result in a prompt asking for notifications permissions. However if the user grants those permissions then hasPermissions is still falsy (since promise returned nothing), so deviceToken will be set to null. Nevertheless permissions are actually granted byt the OS, so the state on the device and keyserver would heal itself on next render.
This differential fixes this case so that if user grants permissions correct state is achieved immediately without need for additional re-render to heal the state.