docs: docs for next release (#14110)

This commit is contained in:
Shahed Nasser
2025-12-01 20:20:01 +02:00
committed by GitHub
parent e4513fab88
commit 223ccb4add
24 changed files with 1196 additions and 27 deletions
@@ -1,3 +1,5 @@
import { Table } from "docs-ui"
export const metadata = {
title: `${pageNumber} Environment Variables in Admin Customizations`,
}
@@ -88,6 +90,70 @@ Learn more about other Vite environment variables in the [Vite documentation](ht
---
## Predefined Environment Variables
You can further customize the Medusa Admin behavior using the following predefined environment variables. You can set the environment variables in your `.env` file or in your deployment platform.
<Note>
The following pre-defined environment variables are available starting [Medusa v2.12.0](https://github.com/medusajs/medusa/releases/tag/v2.12.0).
</Note>
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>
Environment Variable
</Table.HeaderCell>
<Table.HeaderCell>
Description
</Table.HeaderCell>
<Table.HeaderCell>
Default
</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>
`ADMIN_AUTH_TYPE`
</Table.Cell>
<Table.Cell>
A string indicating the authentication method that the JS SDK instance uses in the Medusa Admin. Possible values are `session` and `jwt`. Learn more in the [JS SDK Authentication guide](!resources!/js-sdk/auth/overview).
</Table.Cell>
<Table.Cell>
`session`
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
`ADMIN_JWT_TOKEN_STORAGE_KEY`
</Table.Cell>
<Table.Cell>
A string indicating the key used to store the authentication JWT token in the browser's local storage. Only applicable if `ADMIN_AUTH_TYPE` is set to `jwt`.
</Table.Cell>
<Table.Cell>
`medusa_auth_token`
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
---
## Environment Variables in Production
When you build the Medusa application, including the Medusa Admin, with the `build` command, the environment variables are inlined into the build. This means that you can't change the environment variables without rebuilding the application.
@@ -37,7 +37,7 @@ The next chapters will cover these two topics in detail.
### What You Can't Customize in the Medusa Admin
You can't customize the admin dashboard's layout, design, or the content of the existing pages (aside from injecting widgets). You also can't customize the login page, the authentication flow, or change the Medusa logo used in the admin dashboard.
You can't customize the admin dashboard's layout, design, or the content of the existing pages (aside from injecting widgets). You also can't change the Medusa logo used in the admin dashboard.
If your use case requires heavy customization of the admin dashboard, you can build a custom admin dashboard using Medusa's [Admin API routes](!api!/admin).
@@ -51,6 +51,8 @@ Refer to the [Medusa UI documentation](https://docs.medusajs.com/ui) to learn ho
---
## Admin Components List
## Admin How-to Guides
To build admin customizations that match the Medusa Admin's designs and layouts, refer to [this guide](!resources!/admin-components) to find common components.
The [Admin How-to Guides](!resources!/how-to-tutorials#admin) provides guides that walk you through common admin customizations, such as [building common admin components](!resources!/admin-components), or [adding third-party authentication to the admin](!resources!/how-to-tutorials/how-to/admin/auth).
Refer to these guides for practical examples of customizing the Medusa Admin dashboard.
@@ -113,7 +113,7 @@ Learn more in the [Admin Environment Variables](../admin/environment-variables/p
## Predefined Medusa Environment Variables
The Medusa application uses the following predefined environment variables that you can set:
You can further customize the Medusa application behavior using the following predefined environment variables. You can set the environment variables in your `.env` file or in your deployment platform.
<Note title="Tip">
@@ -306,5 +306,39 @@ You should opt for setting configurations in `medusa-config.ts` where possible.
\-
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
`ADMIN_AUTH_TYPE` ([v2.12.0+](https://github.com/medusajs/medusa/releases/tag/v2.12.0))
</Table.Cell>
<Table.Cell>
A string indicating the authentication method that the JS SDK instance uses in the Medusa Admin. Possible values are `session` and `jwt`. Learn more in the [JS SDK Authentication guide](!resources!/js-sdk/auth/overview).
</Table.Cell>
<Table.Cell>
`session`
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
`ADMIN_JWT_TOKEN_STORAGE_KEY` ([v2.12.0+](https://github.com/medusajs/medusa/releases/tag/v2.12.0))
</Table.Cell>
<Table.Cell>
A string indicating the key used to store the authentication JWT token in the browser's local storage. Only applicable if `ADMIN_AUTH_TYPE` is set to `jwt`.
</Table.Cell>
<Table.Cell>
`medusa_auth_token`
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>