Page MenuHomePhabricator

[lib] add identity register action
ClosedPublic

Authored by varun on Dec 22 2023, 7:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 5:52 PM
Unknown Object (File)
Tue, Nov 26, 3:43 PM
Unknown Object (File)
Sun, Nov 24, 9:51 AM
Unknown Object (File)
Sat, Nov 23, 2:29 AM
Unknown Object (File)
Wed, Nov 20, 12:36 AM
Unknown Object (File)
Fri, Nov 8, 1:16 AM
Unknown Object (File)
Mon, Nov 4, 1:56 PM
Unknown Object (File)
Oct 21 2024, 11:39 PM
Subscribers
None

Details

Summary

since this action is native-specific, i've created a new interface for native-only client methods.

Depends on D10440

Test Plan

successfully dispatched the action on native and registered a new account with staging identity service

Diff Detail

Repository
rCOMM Comm
Branch
deleteuser (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Dec 22 2023, 8:14 AM

i'll re-request review after i put up the diff with the actual useIdentityRegister callsite in a sec

ashoat requested changes to this revision.Dec 23 2023, 8:35 AM

Where is the diff stack here? You're using types that are defined in neither the diff stack nor on master...

lib/actions/user-actions.js
27

Where is this type defined?

246
  1. Why is this returned a string if it's just going to get parsed immediately?
  2. Where is registerUser defined?
lib/actions/user-actions.js
27

it's defined below in lib/types/identity-service-types.js

246
  1. it's because we return a string in CommRustModule due to Rust limitations
  2. it's defined in CommRustModule
This comment has been deleted.
lib/types/identity-service-types.js
31

This needs to extend IdentityServiceClient

lib/actions/user-actions.js
259

Where does the rest of CurrentUserInfo come from if not from identity?

lib/actions/user-actions.js
259

Related discussion: https://linear.app/comm/issue/ENG-4210/handle-avatars-in-currentuserinfo#comment-6bcc3e2a
It looks like we at least want the username to be returned here

lib/actions/user-actions.js
259

the client provides the username when it registers. for the time being we'll have to continue to get settings / avatar from the keyserver

lib/actions/user-actions.js
259

ah i understand your question better now. yes, we should return username here as well so that the reducers can use it

lib/actions/user-actions.js
259

Can you also rename userId to userID? This is the way we usually name variables in our JS codebase

lib/types/identity-service-types.js
25 ↗(On Diff #35581)

talked to @tomek about this and we agreed that making this method optional on both platforms and providing it only on native is the best option. it forces the developer to think about whether this method is actually available before using it

This revision is now accepted and ready to land.Jan 13 2024, 6:26 PM
This revision was automatically updated to reflect the committed changes.