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:
@@ -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
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user