@clerk/nextjs
Version:
Clerk SDK for NextJS
51 lines (45 loc) • 3.13 kB
JavaScript
import "../chunk-BUSYA2B4.js";
import { middlewareFileReference } from "../utils/sdk-versions";
const missingDomainAndProxy = `
Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl.
1) With middleware
e.g. export default clerkMiddleware({domain:'YOUR_DOMAIN',isSatellite:true});
2) With environment variables e.g.
NEXT_PUBLIC_CLERK_DOMAIN='YOUR_DOMAIN'
NEXT_PUBLIC_CLERK_IS_SATELLITE='true'
`;
const missingSignInUrlInDev = `
Invalid signInUrl. A satellite application requires a signInUrl for development instances.
Check if signInUrl is missing from your configuration or if it is not an absolute URL
1) With middleware
e.g. export default clerkMiddleware({signInUrl:'SOME_URL', isSatellite:true});
2) With environment variables e.g.
NEXT_PUBLIC_CLERK_SIGN_IN_URL='SOME_URL'
NEXT_PUBLIC_CLERK_IS_SATELLITE='true'`;
const getAuthAuthHeaderMissing = () => authAuthHeaderMissing("getAuth", void 0, middlewareFileReference);
const authAuthHeaderMissing = (helperName = "auth", prefixSteps, fileReference = "middleware") => {
return `Clerk: ${helperName}() was called but Clerk can't detect usage of clerkMiddleware(). Please ensure the following:
- ${prefixSteps ? [...prefixSteps, ""].join("\n- ") : " "}clerkMiddleware() is used in your Next.js ${fileReference} file.
- Your ${fileReference} matcher is configured to match this route or page.
- If you are using the src directory, make sure the ${fileReference} file is inside of it.
If you've verified your configuration and are still seeing this error, there may be a runtime issue or a problem communicating with Clerk.
For more details, see https://clerk.com/err/auth-middleware
`;
};
const authSignatureInvalid = `Clerk: Unable to verify request, this usually means the Clerk middleware did not run. Ensure Clerk's middleware is properly integrated and matches the current route. For more information, see: https://clerk.com/docs/reference/nextjs/clerk-middleware. (code=auth_signature_invalid)`;
const encryptionKeyInvalid = `Clerk: Unable to decrypt request data, this usually means the encryption key is invalid. Ensure the encryption key is properly set. For more information, see: https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys. (code=encryption_key_invalid)`;
const encryptionKeyInvalidDev = `Clerk: Unable to decrypt request data.
Refresh the page if your .env file was just updated. If the issue persists, ensure the encryption key is valid and properly set.
For more information, see: https://clerk.com/docs/reference/nextjs/clerk-middleware#dynamic-keys. (code=encryption_key_invalid)`;
const encryptionKeyMissing = "Clerk: Missing `CLERK_ENCRYPTION_KEY`. Required for propagating `secretKey` middleware option. See docs: https://clerk.com/docs/references/nextjs/clerk-middleware#dynamic-keys. (code=encryption_key_missing)";
export {
authAuthHeaderMissing,
authSignatureInvalid,
encryptionKeyInvalid,
encryptionKeyInvalidDev,
encryptionKeyMissing,
getAuthAuthHeaderMissing,
missingDomainAndProxy,
missingSignInUrlInDev
};
//# sourceMappingURL=errors.js.map