Page MenuHomePhabricator

[lib][native][web] useIdentityWalletLogIn() hook
ClosedPublic

Authored by varun on Feb 5 2024, 10:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 12:27 PM
Unknown Object (File)
Thu, Nov 7, 1:35 AM
Unknown Object (File)
Oct 14 2024, 5:56 PM
Unknown Object (File)
Oct 14 2024, 5:55 PM
Unknown Object (File)
Oct 14 2024, 5:55 PM
Unknown Object (File)
Oct 14 2024, 5:55 PM
Unknown Object (File)
Oct 14 2024, 5:55 PM
Unknown Object (File)
Oct 14 2024, 5:55 PM
Subscribers
None

Details

Summary

hook that will be used on web and native for SIWE

Depends on D10960

Test Plan

used the hook on web to call the identity service. siwe verification failed as expected (used a random string for the siwe message and signature) but identity logs showed that the request received contained all the correct data. siwe will be tested thoroughly in the next diffs by actually using the hook in native and web siwe components

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 5 2024, 10:13 PM
Harbormaster failed remote builds in B26529: Diff 36666!
native/identity-service/identity-service-context-provider.react.js
280–281 ↗(On Diff #36666)

will rebase and fix this once I resolve ENG-6666. will not land this diff before then

remove some unnecessary checks and a mistakenly added file

varun requested review of this revision.Feb 5 2024, 10:34 PM
tomek requested changes to this revision.Feb 6 2024, 1:10 AM
tomek added inline comments.
lib/actions/user-actions.js
489–496 ↗(On Diff #36667)

It seems we can significantly simplify it

web/grpc/identity-service-client-wrapper.js
305 ↗(On Diff #36667)

Why this function on web requires fewer parameters than the one on native? Shouldn't they be consistent?

This revision now requires changes to proceed.Feb 6 2024, 1:10 AM
web/grpc/identity-service-client-wrapper.js
305 ↗(On Diff #36667)

the code generated web gRPC client takes a single WalletLoginRequest object (this is a generated type). we construct the object and set its fields in lines 295-301 above. on native, we just pass all of the data to the native_rust_library and construct the request object there

lib/actions/user-actions.js
489–496 ↗(On Diff #36667)

good point

This revision is now accepted and ready to land.Feb 7 2024, 6:06 AM