Skip to content

Commit

Permalink
chore(remix): Rename noSecretKeyOrApiKeyError to noSecretKeyError
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkl committed Nov 20, 2023
1 parent c37d43d commit b719e6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/remix/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const loader: LoaderFunction = args => rootAuthLoader(args, ({ auth }) =>
})
`);

export const noSecretKeyOrApiKeyError = createErrorMessage(`
export const noSecretKeyError = createErrorMessage(`
A secretKey must be provided in order to use SSR and the exports from @clerk/remix/api.');
If your runtime supports environment variables, you can add a CLERK_SECRET_KEY variable to your config.
Otherwise, you can pass a secretKey parameter to rootAuthLoader or getAuth.
Expand Down
8 changes: 2 additions & 6 deletions packages/remix/src/ssr/authenticateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import { isDevelopmentFromApiKey } from '@clerk/shared/keys';
import { isHttpOrHttps, isProxyUrlRelative } from '@clerk/shared/proxy';
import { isTruthy } from '@clerk/shared/underscore';

import {
noSecretKeyOrApiKeyError,
satelliteAndMissingProxyUrlAndDomain,
satelliteAndMissingSignInUrl,
} from '../errors';
import { noSecretKeyError, satelliteAndMissingProxyUrlAndDomain, satelliteAndMissingSignInUrl } from '../errors';
import { getEnvVariable } from '../utils';
import type { LoaderFunctionArgs, RootAuthLoaderOptions } from './types';

Expand All @@ -30,7 +26,7 @@ export function authenticateRequest(args: LoaderFunctionArgs, opts: RootAuthLoad
const secretKey = opts.secretKey || getEnvVariable('CLERK_SECRET_KEY', context) || '';

if (!secretKey) {
throw new Error(noSecretKeyOrApiKeyError);
throw new Error(noSecretKeyError);
}

const publishableKey = opts.publishableKey || getEnvVariable('CLERK_PUBLISHABLE_KEY', context) || '';
Expand Down

0 comments on commit b719e6e

Please sign in to comment.