From b3576a29f03e8e18341495da402d2846820fffa7 Mon Sep 17 00:00:00 2001 From: TheCactusBlue Date: Wed, 9 Apr 2025 09:33:37 -0700 Subject: [PATCH] make maxAttempts configurable --- packages/template/package.json | 3 ++- .../apps/implementations/client-app-impl.ts | 26 +++++++++---------- pnpm-lock.yaml | 3 +++ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/packages/template/package.json b/packages/template/package.json index dd7c573ea..1a00f79b2 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -45,6 +45,7 @@ ], "dependencies": { "@hookform/resolvers": "^3.3.4", + "@oslojs/otp": "^1.1.0", "@simplewebauthn/browser": "^11.0.0", "@stackframe/stack-sc": "workspace:*", "@stackframe/stack-shared": "workspace:*", @@ -57,7 +58,7 @@ "js-cookie": "^3.0.5", "lucide-react": "^0.378.0", "oauth4webapi": "^2.10.3", - "@oslojs/otp": "^1.1.0", + "open": "^10.1.0", "qrcode": "^1.5.4", "react-avatar-editor": "^13.0.2", "react-hook-form": "^7.51.4", diff --git a/packages/template/src/lib/stack-app/apps/implementations/client-app-impl.ts b/packages/template/src/lib/stack-app/apps/implementations/client-app-impl.ts index b34f016c7..08a4561ab 100644 --- a/packages/template/src/lib/stack-app/apps/implementations/client-app-impl.ts +++ b/packages/template/src/lib/stack-app/apps/implementations/client-app-impl.ts @@ -1592,7 +1592,7 @@ export class _StackClientAppImplIncomplete> { + async promptCliLogin(options: { appUrl: string, expiresInMillis?: number, maxAttempts?: number, waitTimeMillis?: number }): Promise> { // Step 1: Initiate the CLI auth process const response = await this._interface.sendClientRequest( "/auth/cli", @@ -1627,9 +1627,7 @@ export class _StackClientAppImplIncomplete