adminjs-expressjs icon indicating copy to clipboard operation
adminjs-expressjs copied to clipboard

Changing the root path breaks login redirect

Open lpbonomi opened this issue 2 years ago • 2 comments

After changing the root path to "" the login redirect breaks and is stuck with the message "Found. Redirecting to"

lpbonomi avatar Sep 01 '23 15:09 lpbonomi

@lpbonomi I don't think it's mentioned in any docs, but when you create a new adminjs instance you can pass loginPath:

const adminJS = new AdminJS({
 [
      // Your resources go here
  ],
  rootPath: "/newadmin",
  loginPath: "/newadmin/login",
});

You can look into this method

vitalii-bulyzhyn avatar Sep 06 '23 10:09 vitalii-bulyzhyn

If I remember correctly, I had also changed the login and logout path. So I guess it's some other thing. Thanks anyways!

lpbonomi avatar Sep 06 '23 11:09 lpbonomi