chore: Configure auth on JS-SDK in dashboard (#14013)

* chore: Use env vars rather than configs

* Create wicked-turkeys-sell.md
This commit is contained in:
Oli Juhl
2025-11-11 11:15:58 +01:00
committed by GitHub
parent 2b6c39535f
commit c93f77d1b2
6 changed files with 35 additions and 5 deletions
@@ -1,11 +1,14 @@
import Medusa from "@medusajs/js-sdk"
export const backendUrl = __BACKEND_URL__ ?? "/"
const authType = __AUTH_TYPE__ ?? "session"
const jwtTokenStorageKey = __JWT_TOKEN_STORAGE_KEY__ || undefined
export const sdk = new Medusa({
baseUrl: backendUrl,
auth: {
type: "session",
type: authType,
jwtTokenStorageKey
},
})