From 15c8ad33b0d34f98168da1f05d30ad7adaa3616d Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Wed, 15 Nov 2023 14:51:02 +0200 Subject: [PATCH] chore(backend): Drop `remotePublicInterstitial` --- packages/backend/README.md | 3 --- packages/backend/src/tokens/factory.ts | 23 ------------------- .../sdk-node/src/__tests__/middleware.test.ts | 1 - 3 files changed, 27 deletions(-) diff --git a/packages/backend/README.md b/packages/backend/README.md index ae93eb635f6..ab3c5784372 100644 --- a/packages/backend/README.md +++ b/packages/backend/README.md @@ -101,9 +101,6 @@ clerk.debugRequestState(requestState); // Load clerk interstitial from this package clerk.localInterstitial(options); -// Load clerk interstitial from the public Backend API endpoint -clerk.remotePublicInterstitial(options); - // Load clerk interstitial from the public Private API endpoint (Deprecated) clerk.remotePrivateInterstitial(options); ``` diff --git a/packages/backend/src/tokens/factory.ts b/packages/backend/src/tokens/factory.ts index 8f2d50a66e0..0c1ce56850b 100644 --- a/packages/backend/src/tokens/factory.ts +++ b/packages/backend/src/tokens/factory.ts @@ -80,36 +80,13 @@ export function createAuthenticateRequest(params: CreateAuthenticateRequestOptio domain: runtimeDomain || buildtimeDomain, }); - const remotePublicInterstitial = ({ - publishableKey: runtimePublishableKey, - proxyUrl: runtimeProxyUrl, - isSatellite: runtimeIsSatellite, - domain: runtimeDomain, - userAgent: runtimeUserAgent, - ...rest - }: LoadInterstitialOptions) => { - return loadInterstitialFromBAPI({ - ...rest, - apiUrl, - publishableKey: runtimePublishableKey || buildtimePublishableKey, - proxyUrl: runtimeProxyUrl || buildProxyUrl, - isSatellite: runtimeIsSatellite || buildtimeIsSatellite, - domain: (runtimeDomain || buildtimeDomain) as any, - userAgent: runtimeUserAgent || buildUserAgent, - }); - }; - - const remotePublicInterstitialUrl = buildPublicInterstitialUrl; - // TODO: Replace this function with remotePublicInterstitial const remotePrivateInterstitial = () => apiClient.interstitial.getInterstitial(); return { authenticateRequest, localInterstitial, - remotePublicInterstitial, remotePrivateInterstitial, - remotePublicInterstitialUrl, debugRequestState, }; } diff --git a/packages/sdk-node/src/__tests__/middleware.test.ts b/packages/sdk-node/src/__tests__/middleware.test.ts index 035999d7452..dd62716deb4 100644 --- a/packages/sdk-node/src/__tests__/middleware.test.ts +++ b/packages/sdk-node/src/__tests__/middleware.test.ts @@ -15,7 +15,6 @@ afterEach(() => { const mockClerkClient = () => ({ authenticateRequest: jest.fn(), - remotePublicInterstitial: jest.fn(), remotePrivateInterstitial: jest.fn(), localInterstitial: jest.fn(), });