#Can't login into admin panel in dev mode with beta packages

1 messages · Page 1 of 1 (latest)

fleet river
#

I want to add a new Admin feature in my store. I'm following the documentation at https://docs.medusajs.com/admin/widgets.

When I run npm start, I can go to http://localhost:9000/app/login, and login with the default [email protected] credentials.

When I run npm run dev, it automatically opens a new tab on port 7001. I can't login.

(BTW I think it's annoying to have a different ports, especially if it's hardcoded somewhere and I don't have the control over what port is used)

What am I missing? Why the credentials doesn't work on dev version?

pale sierra
#

Is there any error in console?

#

And what is your ADMIN_CORS?

fleet river
#

ooohhhhh

#

Yeah that was it

#

I have updated the ADMIN_CORS to

const ADMIN_CORS =
  process.env.ADMIN_CORS || "http://localhost:9000,http://localhost:7001";
#

now it works 😅