Skip to content

Commit b57e458

Browse files
authored
Bring back old content environments dev/prod (#2738)
1 parent 6bbec8f commit b57e458

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

docs/guides/development/managing-environments.mdx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ A `Development` instance is Clerk's default instance type and has characteristic
1111

1212
Some notable examples of `Development`-only characteristics in a Clerk application are:
1313

14-
- A `Development` banner is shown prominently in the Clerk Dashboard to make clear you're managing or configuring non-production data
15-
- Email and SMS templates are prefixed with the environment type to prevent against using `Development` instances for production purposes
16-
- Some social connections use shared credentials by default
17-
- [The Account Portal](/docs/guides/customizing-clerk/account-portal) will use a Clerk development domain that ends with `accounts.dev` instead of your app's production domain
18-
- OAuth consent screens will show the development domain that ends with `accounts.dev` instead of your production domain
19-
- Search engines will not be able to crawl and index your application
20-
- Development instances have a 100 users cap and user data can not be transferred between instances
14+
- A `Development` banner is shown prominently in the Clerk Dashboard to make clear you're managing or configuring non-production data.
15+
- Email and SMS templates are prefixed with the environment type to prevent against using `Development` instances for production purposes.
16+
- Some social connections use shared credentials by default.
17+
- [The Account Portal](/docs/guides/customizing-clerk/account-portal) will use a Clerk development domain that ends with `accounts.dev` instead of your app's production domain.
18+
- OAuth consent screens will show the development domain that ends with `accounts.dev` instead of your production domain.
19+
- Search engines will not be able to crawl and index your application.
20+
- Development instances are capped at 100 users, and user data can not be transferred between instances.
21+
- The architecture of Clerk's sessions management is different in development environments compared to production environments, due to the need to communicate cross-domain between `localhost` and `<slug>.accounts.dev`. The `__clerk_db_jwt` object is _only_ used in development environments. For more specific details on the differences between Clerk's session management architecture in development and production environments, see the [technical breakdown below](#session-architecture-differences).
2122

2223
> [!NOTE]
23-
> All paid functionality is available in a `Development` instance. However, when you deploy your application to `Production`, you will be asked to upgrade to a `Pro` account. See [our pricing page](/pricing) for full details.
24+
> All paid functionality is available in a `Development` instance. However, when you deploy your application to `Production`, you will be asked to upgrade to a `Pro` account if you are using paid features. See [our pricing page](/pricing) for full details.
2425
2526
## Production instance
2627

@@ -100,3 +101,12 @@ To use an additional root domain, you must first configure your host to deploy p
100101
- **Netlify:** use the [Automatic Deploy Subdomain](https://docs.netlify.com/domains-https/custom-domains/automatic-deploy-subdomains/) feature.
101102

102103
You can configure this environment with either your development API keys (recommended) or you can create an additional production instance and use those production API keys.
104+
105+
## Session architecture differences
106+
107+
> [!TIP]
108+
> In order to understand this section, it's recommended to have a solid understanding of how Clerk's session management architecture works. For more information on this topic, check out the guide on [how Clerk works](/docs/guides/how-clerk-works/overview).
109+
110+
Clerk manages session state differently in production and development environments.
111+
112+
<Include src="_partials/clerkdbjwt-vs-client-cookie" />

docs/guides/how-clerk-works/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ For this reason:
263263
1. Never deploy a development environment to production.
264264
1. Do not rely on `__clerk_db_jwt` in your application code, as it will break in production.
265265

266-
For more information on the differences between development and production environments, see the [dedicated guide on Clerk environments](/docs/guides/development/managing-environments).
266+
For more information on the differences between development and production environments, see the [dedicated guide on Clerk environments](/docs/guides/development/managing-environments#session-architecture-differences).
267267

268268
### Session token
269269

@@ -344,4 +344,4 @@ This server -> browser -> FAPI request includes the client token, so FAPI is abl
344344
- the anatomy of clerk's sign up and sign in flows
345345
- subdomain session sharing
346346
- satellite domains
347-
*/}
347+
*/}

0 commit comments

Comments
 (0)