I have a java action with a java servlet where I have to redirect a user to a 3rd party login page. The HttpServletResponse I get from HttpServletResponse response = context().getRuntimeResponse().get().getHttpServletResponse(); is shown here, and appears to be what I want after I call: response.sendRedirect(authorizeURL); The response: $latestHttpResponse/Content: HTTP/1.1 302 Date: Thu, 05 Jul 2018 18:21:32 GMT Cache-Control: no-store Content-Type: application/json;charset=utf-8 Set-Cookie: JSESSIONID=node0166ugfzznopli4widtwsq6lys0.node0;Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Location: https://MYCLIENT.auth0.com/authorize?redirect_uri=https://MYCLIENT.auth0.com/mobile&client_id=CLIENTID&scope=openid&response_type=code&state=state However the app says "A connection error occurred, please try again later." and in the Mendix Console I get a Client log node error: Failed to fetch Error: Failed to fetch at new t (http://localhost:8080/mxclientsystem/mxui/mxui.js?636663864373994195:46:108020) at http://localhost:8080/mxclientsystem/mxui/mxui.js?636663864373994195:46:21997 at http://localhost:8080/mxclientsystem/mxui/mxui.js?636663864373994195:20:1623 at Object.throw (http://localhost:8080/mxclientsystem/mxui/mxui.js?636663864373994195:20:1728) at s (http://localhost:8080/mxclientsystem/mxui/mxui.js?636663864373994195:20:581) This is from when I run locally, but I get the same error when running from the cloud. How can I redirect to a dynamic external URL and receive a response? If I just take the dynamic redirect URL and go there from a link on the homepage, I am unable to receive the context or login credentials of the response. I think I may need a request handler, but the documentation I found doesn't make it clear how to use them for external URLs.
↧