XMLHttpRequest POST Request Returns 403 Forbidden on custom URL

0
Hi, I'm working on a functionality to automatically login a user once a user has signed up to the system (based on https://www.mattkdaniels.com/blogs/walkthrough-enabling-autologin-functionality-within-your-mendix-app). So I have set up a custom request handler, JavaScript snippet to redirect the user, login tokens, all based on the blog post mentioned earlier. I have a sign up page with a custom URL page set from the modeler to /signup (I have multiple user tables so having a custom URL page for different user is important, especially since I want to be able to have external link for this app). The first thing I notice is that the sign up page no longer uses index.html?profile=Responsive as the Referer for Request URL.  Whenever I auto-login a user without a custom URL page set, my custom auto-login function works perfectly. But, when I set the sign up page with custom URL, it always returns 403 Forbidden. The session is created, but the user is immediately redirected to login.html, and the session is immediately removed. The referer has changed to /signup, and the profile is missing. I honestly have no idea what to do here. I looked up some resources but can't seem to modify the request header so this left me in a difficult situation. Anyone has a clue on what's the workaround for this?
asked
0 answers