File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/backend/src/tokens Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/backend ' : patch
3+ ---
4+
5+ Fix a case where handshakes would get triggered in a loop on cross origin requests in development.
Original file line number Diff line number Diff line change @@ -577,7 +577,8 @@ export const authenticateRequest: AuthenticateRequest = (async (
577577 ! authenticateContext . isSatellite && // We're on primary
578578 authenticateContext . secFetchDest === 'document' && // Document navigation
579579 authenticateContext . isCrossOriginReferrer ( ) && // Came from different domain
580- ! authenticateContext . isKnownClerkReferrer ( ) ; // Not from Clerk accounts portal or FAPI
580+ ! authenticateContext . isKnownClerkReferrer ( ) && // Not from Clerk accounts portal or FAPI
581+ authenticateContext . handshakeRedirectLoopCounter === 0 ; // Not in a redirect loop
581582
582583 if ( shouldForceHandshakeForCrossDomain ) {
583584 return handleMaybeHandshakeStatus (
You can’t perform that action at this time.
0 commit comments