Page MenuHomePhabricator

[identity] fix reserved username workflow for wallet users
ClosedPublic

Authored by varun on Jun 21 2024, 4:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 4:56 AM
Unknown Object (File)
Sat, Oct 19, 12:24 AM
Unknown Object (File)
Oct 12 2024, 3:10 PM
Unknown Object (File)
Oct 12 2024, 3:10 PM
Unknown Object (File)
Oct 12 2024, 3:10 PM
Unknown Object (File)
Oct 12 2024, 3:10 PM
Unknown Object (File)
Sep 30 2024, 4:39 AM
Unknown Object (File)
Sep 28 2024, 8:32 AM
Subscribers

Details

Summary

wallet users prove their identity with SIWE so there's no need for them to get a message from ashoat's keyserver.

one thing to note here is that users don't send OTKs when calling log_in_wallet_user, so the user won't have any OTKs initially. I think we made OTKs optional, though, so not sure how much this matters.

another thing to note is that if the user is registered here, their device list will be created by the identity service

Depends on D12515

Test Plan

tested later in stack by registering a password and wallet user directly with my keyserver, which in turn called identity and added the address and username to the reserved usernames table

then, i flipped usingCSAT to true and tried logging in from web, which failed and displayed a message saying to log in from a mobile device

then, i tried logging in from native, which succeeded

then, i tried loggin in from web again, which succeeded

verified that username and wallet address were no longer in reserved usernames table

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Jun 21 2024, 4:53 PM

Looks good. Left some nits

services/identity/src/database.rs
354–357

I prefer builder pattern but up to you

360

I guess this might be useful

1143–1146

Nit, more readable

This revision is now accepted and ready to land.Jun 21 2024, 10:51 PM
services/identity/src/database.rs
354–357

we only use set_transact_items in the codebase today so created a follow up task for this: https://linear.app/comm/issue/ENG-8523/consider-using-transact-items-instead-of-set-transact-items

1143–1146

omitted the type annotation because it seemed fairly obvious