fix(ui): ensure nonce is always a string in gateway connect

This commit is contained in:
Val Alexander
2026-02-22 13:04:28 -06:00
parent 6298698008
commit 42b3c52350

View File

@@ -169,13 +169,13 @@ export class GatewayBrowserClient {
publicKey: string;
signature: string;
signedAt: number;
nonce: string | undefined;
nonce: string;
}
| undefined;
if (isSecureContext && deviceIdentity) {
const signedAtMs = Date.now();
const nonce = this.connectNonce ?? undefined;
const nonce = this.connectNonce ?? "";
const payload = buildDeviceAuthPayload({
deviceId: deviceIdentity.deviceId,
clientId: this.opts.clientName ?? GATEWAY_CLIENT_NAMES.CONTROL_UI,