I have a local development and a AWS Docker production site using Nodejs.
On the local development, I have set up a URL redirect after login that contains the query for the page that the user was on prior to login. This is working as intended.
On the AWS Docker production site, the URL redirect after login with the query of the page that the user was on prior to login is not working as intended.
No matter which page a user was on prior to login, the URL Query parameter is switched from the what it should be to /login?url=/login which causes a an ERR_TOO_MANY_REDIRECTS error.
Sounds like somehow you are looping back and forward in an infinite loop.
What happens if you remove the parameter from the enforcer, do you still get the error?
Sorry think am out of ideas. Not an AWS/docker user so if it is server related I am unable to help.
All I can think of is that the login credentials are somehow not being stored so login is successful but when redirected they are not detected/ have been lost and redirection happens again.
Not sure if that is the issue to be honest. When I login, it redirects to the dashboard page and that is where the error occurs. But if I go to the home page, which is not secured, it shows my first name and the logout button. So, it would appear that the login credentials are being maintained. When I take the security off the dashboard page, it shows normally with my first name as well.
When I apply a different security using a different permission group to any other page, the error occurs as well.
I feel like something has not been uploaded, but I am unsure what it could be. Since it is docker, I am not sure how to force the publishing of all files. I have tried publishing of course, deploy as well, I even did a shutdown and clear all services (after backing up the database).
It is my understanding with docker that what you see on the local side of things should mirror the remote docker side of things, so that is why I am confused as well.
The three table method: users table, roles table, join table.
OMG! I just figured it out!!! Thanks @Hyperbytes for the tip!
In my local development, I have the database set up through the Resource Manager. When I publish the site, the local data is not being transferred to the remote server. As a result, while I had given my user roles on the local site, they were non-existent on the remote side.
I did a data export and import using MySQL Workbench and it works as intended now. That did bring up a different issue about why the “Save Database Structure and Data” button does not work when using the Resource Manager, but that’s an issue for a different topic (after I search to see if it has been reported before).
Sorry to have wasted your time @Hyperbytes. This is definitely an issue on my side.