Skip to content

Commit 264a9be

Browse files
committed
fix: reset bootstrapPromise after successful pairing to prevent redirect loop
After submitServerAuthCredential successfully exchanges a token, the module-level bootstrapPromise was never cleared. This caused resolveInitialServerAuthGateState to return the stale cached requires-auth state, trapping users in a redirect loop between / and /pair despite being authenticated.
1 parent 709a25c commit 264a9be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/web/src/authBootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export async function submitServerAuthCredential(credential: string): Promise<vo
123123

124124
await exchangeBootstrapCredential(resolvePrimaryEnvironmentHttpBaseUrl(), trimmedCredential);
125125
stripPairingTokenFromUrl();
126+
bootstrapPromise = null;
126127
}
127128

128129
export function resolveInitialServerAuthGateState(): Promise<ServerAuthGateState> {

0 commit comments

Comments
 (0)