Skip to content

Commit c5c628d

Browse files
fix(host-papp): raise SSO request size limit (#181)
1 parent 5fb3cb9 commit c5c628d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/host-papp/src/sso/sessionManager/userSession.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import type { SigningPayloadRequest, SigningPayloadResponseData, SigningRawReque
2626
// payload is for an SDK version the mobile app doesn't support yet. After
2727
// this timeout the queue task fails, freeing the pool for the next request.
2828
const QUEUE_TASK_TIMEOUT_MS = 180_000;
29+
// Mobile SSO statements allow 256 KiB total; keep headroom for statement/session overhead.
30+
const MAX_SSO_REQUEST_SIZE = 254 * 1024;
2931

3032
function withQueueTimeout<T>(resultAsync: ResultAsync<T, Error>, label: string): ResultAsync<T, Error> {
3133
const timeoutPromise = new Promise<Result<T, Error>>(resolve =>
@@ -128,6 +130,7 @@ export function createUserSession({
128130
statementStore,
129131
encryption,
130132
prover,
133+
maxRequestSize: MAX_SSO_REQUEST_SIZE,
131134
});
132135

133136
const processedMessages = fieldListView<string>({

0 commit comments

Comments
 (0)