Reference
Remy Reference/interface/chat.claimThread
?

chat.claimThread

Binds an anonymous thread to the just-signed-in user so it survives login.
chat.claimThread(threadId, options?) → Promise<void>

Re-binds a thread started before sign-in to the now-authenticated user. Login swaps the session and its visitor identity, which would otherwise leave that thread unreachable, so call this right after verification for each thread worth keeping. The client remembers the pre-login token for threads touched this page session (pass previousToken for one from an earlier load), and an already-owned thread rejects with already_identified.

Parameters
threadId
string
RequiredThe anonymous thread to claim.
options
{ previousToken? }
previousToken: the token the thread was created under, for a thread from an earlier page load. Omit for threads touched this session (the client remembers those).
Claim after verifying
await auth.verifyEmailCode(id, code); // your in-app verification
await chat.claimThread(threadId);     // re-bind the anonymous thread to the user