I test the same way. I have a simple CAS client using Spring Security running on localhost but on a different port that CAS. When logging into to t heis simple client, i get redirected to CAS login page then after successful login I get redirected back to my app.
Make sure your cas client is configured apprpiately, in my simple app I have: server.port=9000 app.service.home=http://localhost:9000/ cas.server.root=https://localhost:8443 cas.url.prefix=${cas.server.root}/cas/ cas.service.login=${cas.server.root}/cas/login cas.service.logout=${cas.server.root}/cas/logout -psv On Sunday, February 19, 2023 at 4:07:07 AM UTC-6 same...@gmail.com wrote: > I set up a CAS server locally so that I can test an application. Both the > client application and CAS server runs on the same machine. > > The application redirects to the CAS server but the CAS server sees that > the client IP address and the CAS server IP address is the same as shown > below: > > CLIENT IP ADDRESS: 127.0.0.1 > SERVER IP ADDRESS: 127.0.0.1 > > I believe this is the reason why when the CAS server redirects back after > authentication, the base URL of the redirect URL is the URL of the CAS > server(localhost and CAS server port). > > As both the client application and CAS server runs on the same machine on > different ports, how can I ensure that the CAS server after authentication > redirects to the client app url(localhost and client application port) > rather than the CAS server? > > Thank you > > > > > > -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscr...@apereo.org. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/0eff3553-2a54-46c4-986a-e3997527080en%40apereo.org.