Skip to content

Commit 773d71c

Browse files
authored
chore(remix): Remove M2M related feature (#6749)
1 parent 24d0742 commit 773d71c

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.changeset/poor-cycles-dress.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@clerk/remix": minor
3+
---
4+
5+
Remove `machineSecretKey` option. Please migrate to `@clerk/react-router` instead.
6+
7+
Migration guide: https://reactrouter.com/upgrading/remix
8+
React Router SDK: https://clerk.com/docs/quickstarts/react-router

packages/remix/src/ssr/authenticateRequest.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import { patchRequest } from './utils';
88

99
export async function authenticateRequest(
1010
args: LoaderFunctionArgs,
11-
opts: AuthenticateRequestOptions,
11+
opts: Omit<AuthenticateRequestOptions, 'machineSecretKey'>,
1212
): Promise<SignedInState | SignedOutState> {
1313
const { request } = args;
1414
const { audience, authorizedParties } = opts;
1515

16-
const { apiUrl, secretKey, jwtKey, proxyUrl, isSatellite, domain, publishableKey, machineSecretKey } = opts;
16+
const { apiUrl, secretKey, jwtKey, proxyUrl, isSatellite, domain, publishableKey } = opts;
1717
const { signInUrl, signUpUrl, afterSignInUrl, afterSignUpUrl } = opts;
1818

1919
const requestState = await createClerkClient({
@@ -32,7 +32,6 @@ export async function authenticateRequest(
3232
signUpUrl,
3333
afterSignInUrl,
3434
afterSignUpUrl,
35-
machineSecretKey,
3635
});
3736

3837
const locationHeader = requestState.headers.get(constants.Headers.Location);

packages/remix/src/ssr/loadOptions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export const loadOptions = (args: LoaderFunctionArgs, overrides: RootAuthLoaderO
2020
// 3. Then try from globalThis (Cloudflare Workers).
2121
// 4. Then from loader context (Cloudflare Pages).
2222
const secretKey = overrides.secretKey || getEnvVariable('CLERK_SECRET_KEY', context) || '';
23-
const machineSecretKey = overrides.machineSecretKey || getEnvVariable('CLERK_MACHINE_SECRET_KEY', context);
2423
const publishableKey = overrides.publishableKey || getEnvVariable('CLERK_PUBLISHABLE_KEY', context) || '';
2524
const jwtKey = overrides.jwtKey || getEnvVariable('CLERK_JWT_KEY', context);
2625
const apiUrl = getEnvVariable('CLERK_API_URL', context) || apiUrlFromPublishableKey(publishableKey);
@@ -70,7 +69,6 @@ export const loadOptions = (args: LoaderFunctionArgs, overrides: RootAuthLoaderO
7069
// used to append options that are not initialized from env
7170
...overrides,
7271
secretKey,
73-
machineSecretKey,
7472
publishableKey,
7573
jwtKey,
7674
apiUrl,

packages/remix/src/ssr/types.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ export type RootAuthLoaderOptions = {
1717
publishableKey?: string;
1818
jwtKey?: string;
1919
secretKey?: string;
20-
/**
21-
* Used to override the CLERK_MACHINE_SECRET_KEY env variable if needed.
22-
*/
23-
machineSecretKey?: string;
2420
/**
2521
* @deprecated Use [session token claims](https://clerk.com/docs/backend-requests/making/custom-session-token) instead.
2622
*/

0 commit comments

Comments
 (0)