Page MenuHomePhabricator

[lib] Refactor useLogIn to be more generic
ClosedPublic

Authored by ashoat on May 20 2024, 3:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 3:05 AM
Unknown Object (File)
Fri, Jun 21, 4:58 AM
Unknown Object (File)
Fri, Jun 21, 4:57 AM
Unknown Object (File)
Thu, Jun 20, 11:02 PM
Unknown Object (File)
Thu, Jun 20, 7:22 AM
Unknown Object (File)
Wed, Jun 19, 9:13 PM
Unknown Object (File)
Wed, Jun 19, 10:24 AM
Unknown Object (File)
Wed, Jun 19, 10:23 AM
Subscribers
None

Details

Summary

useLogIn is a helper function internal to login-hooks.js. This diff refactors the helper function in preparation for a new use case that will be introduced in the next diff.

Right now useLogIn is coupled with the specific forms of login that it supports; this diff makes it more generic.

Depends on D12112

Test Plan

I tested the flow using staging, with my phone as a primary device and a local simulator as a secondary device

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek added inline comments.
lib/hooks/login-hooks.js
35 ↗(On Diff #40387)

Nit: maybe name this argument to hint at what kind of promise this is

156 ↗(On Diff #40387)

nit

This revision is now accepted and ready to land.May 21 2024, 12:44 AM
This revision was landed with ongoing or failed builds.May 21 2024, 1:11 AM
This revision was automatically updated to reflect the committed changes.