Replies: 10 comments 21 replies
-
Maybe shoud enbale |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue, admin app works fine when running The issue is on the POST /auth/session call (explained here). It is not setting the
but when running develop gives
As localhost runs on http I think the cookie is being blocked. One solution for testing the built app locally is to use some tool like Ngrok to access the localhost via an https url. Though a configuration to turn secure cookie off for testing the build locally would be nice. As far as I know this isn`t available right now. [Edit] Typos |
Beta Was this translation helpful? Give feedback.
-
Did you try the following?
|
Beta Was this translation helpful? Give feedback.
-
this works fine for me. Can you share your full medusa-config? And most importantly, what medusa version are you running? |
Beta Was this translation helpful? Give feedback.
-
Please nest the cookieOptions attribute under projectConfig: projectConfig: {
cookieOptions: { secure: false }, |
Beta Was this translation helpful? Give feedback.
-
"dependencies": { |
Beta Was this translation helpful? Give feedback.
-
projectConfig: { |
Beta Was this translation helpful? Give feedback.
-
updated things still getting this error |
Beta Was this translation helpful? Give feedback.
-
server {
} server {
} |
Beta Was this translation helpful? Give feedback.
-
if you are testing on local, add this to your defineConfig inside medusa-config.ts: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After logging into the Medusa admin panel, any GET request to /admin/users/me returns a 401 Unauthorized error. The network request only includes a cookie: lng=en header, and the session cookie (typically something like connect.sid) is missing. I’ve verified that my JWT_SECRET and COOKIE_SECRET environment variables are correctly set, and my CORS configuration includes the appropriate domains. I’m running the backend on http://localhost:9000 and accessing the admin panel via http://localhost:9000/app. I suspect the issue is related to session cookie misconfiguration or CORS settings in production.
Beta Was this translation helpful? Give feedback.
All reactions