# Missing publishableKey

**Short answer:** The frontend authentication provider did not receive its required publishable key. A missing build variable, wrong environment or incorrect initialization can cause it.

## Fix it without weakening the boundary

1. Identify the framework's supported public key configuration.
2. Confirm the value is the intended instance's publishable key, not its secret key.
3. Rebuild if the framework inlines the value into client assets.
4. Verify sign-in and a private route while keeping backend credentials server-side.

```text
Client: publishable key only
Server: secret key only where authorized backend operations need it
```

> Never solve a missing client key by exposing the backend secret.

## Verify the result

Repeat the original operation in the intended environment with a controlled account or synthetic input. Verify the legitimate path still succeeds and an unauthorized caller does not gain new access. Keep unresolved provider, routing or authentication questions explicit rather than converting a generic response into a pass.

See [the related practical guide](/guides/vite-env-vs-next-public-what-gets-exposed) for the surrounding application boundary and [scan methodology](/methodology) for what an outside check can establish.

## Questions

### Does this error mean my app was hacked?

The frontend authentication provider did not receive its required publishable key. A missing build variable, wrong environment or incorrect initialization can cause it. The message alone does not establish compromise.

### What should I avoid while fixing it?

Never solve a missing client key by exposing the backend secret.

### Can a public scan diagnose the whole problem?

No. A public check can inspect supported deployed signals but cannot read your private provider configuration, sign in as your users or exercise payment fulfillment. Follow the provider-specific procedure above.

> **Scan box**
>
> Check your deployed public surface. Private provider configuration and authenticated workflows need separate review.

[All errors](/errors) · [Scan your app free](/)

## Sources

- [Official Authentication documentation](https://clerk.com/docs/guides/development/clerk-environment-variables)

*Written by Brennan Zambo. Published and updated November 26, 2026.*
