Constructor
new RemoteAuth(options)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | options Properties
|
- Source:
Methods
(async) afterInitializationFailureBrowserClosed()
Client invokes this only after Chromium has been closed. Keeping local profile deletion and owned-pool shutdown on this side of that boundary prevents Chrome from recreating files while cleanup runs.
- Source:
checkpoint()
Queues a serialized durable checkpoint. Periodic calls are coalesced so a slow store can never build an unbounded interval backlog.
- Source:
(async) checkpointInitialNativePairingReady()
The initial PostgreSQL pairing checkpoint races with the last app-state IndexedDB transaction even after the readiness sample was stable. The live Chromium profile can also change while its artifact is streamed. Retry only those two explicit transient conditions and keep every other checkpoint failure fatal.
- Source:
(async) finalizeNativeFailure()
Fail closed while the fencing lease is still owned: stop browser writes, attempt the handoff rollback, and release the lease only after Chromium termination is proven. Cleanup failures are aggregated with the primary error using fixed messages so credentials or key material never become log/event labels.
- Source:
(async) installCanonicalWebSocketGate()
A cross-provider candidate must load WhatsApp's runtime before its canonical credentials can be written. A dedicated MV3 extension blocks every WebSocket at Chromium's request boundary during that first load, so the empty bootstrap profile cannot request a pairing ref or race the source companion. The extension is removed only while the page is offline, after the imported tuple passed its readback gate.
- Source:
isCanonicalActivationRecoveryRequired()
Stop every local writer before a rollback or lease release. Concurrent failure paths share one promise so Chromium and the bridge are closed at most once during an initialization lifecycle.
- Source:
isPostPointOfNoReturnRecoveryPending()
Returns only in-memory evidence backed by the durable active-revision activation marker. The Client uses this during failure cleanup to advertise forward recovery without ever claiming ONLINE or exposing a replacement QR after the point of no return.
- Source:
reconcileResolvedIdentityWebVersion()
Keep the live/latest store binding aligned with the document that produced the trusted companion identity. A controlled native-stall recovery may reload WhatsApp Web after the earlier ABI preflight and the live endpoint can legitimately serve a newer (or adjacent rollout) build. getCompanionIdentity() attests the module ABI, web version and companion fingerprint from that same document, so an unpinned store may safely rebind here. Integrity-pinned stores remain strictly fail-closed.
- Source:
(async) rollbackHandoff()
Collapse concurrent failure paths onto one fenced rollback. A transient database failure is retried while the lease is still owned; callers must not release the lease until this method resolves.
- Source:
(async) shutdown()
Persists a final checkpoint without deleting the remote session, then removes the ephemeral Chromium profile.
- Source: