Page MenuHomePhabricator

[lib] add reserved username workflow to identity login actions
Changes PlannedPublic

Authored by varun on Mon, May 6, 7:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 17, 6:25 PM
Unknown Object (File)
Sun, May 12, 11:36 AM
Unknown Object (File)
Sat, May 11, 9:08 PM
Unknown Object (File)
Sat, May 11, 7:43 PM
Unknown Object (File)
Fri, May 10, 8:32 PM
Subscribers
None

Details

Reviewers
ashoat
tomek
Summary

in our identity login actions, we should check the exception message and if it tells us that the username/wallet address is reserved, we should attempt reserved registration (if possible, i.e. if on native)

Depends on D11911

Test Plan

called the useLogIn hooks with a reserved username and reserved wallet address and confirming that i was registered on identity. this will be tested further in next diff which will use the login hook from the native handler component responsible for background authing users who are missing a CSAT

Diff Detail

Repository
rCOMM Comm
Branch
delete-user-client (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

lib/actions/user-actions.js
661–673

not sure why, but flow wasn't able to see that identityClient.registerReservedPasswordUser is not undefined inside this condition, so i used the registerReservedPasswordUser function, which calls identityClient.registerReservedPasswordUser. would like to avoid this indirection if there's a better way to resolve the flow issue

varun published this revision for review.Mon, May 6, 7:49 AM
varun planned changes to this revision.

Improve test plan

lib/actions/user-actions.js
661–673

I think you can avoid it if you extract registerReservedPasswordUser to a local varible before checking it