Issue handling Browser Back button in CAS UI flow

24 views
Skip to first unread message

Yan Zhou

unread,
Apr 9, 2018, 1:50:48 PM4/9/18
to CAS Community
Hello, 

I built CAS 4.1.9 overlay webapp. In order to test transition among the UI screens using browser Back button, I enabled AUP flow just so I can have a couple screens to navigate with. 

Login Screen -> Accept User Agreement -> Success Page. 

When I am in the 2nd screen, I can use Browser Back button to go back to the 1st screen,  but when I am at the last screen (success page), hitting browser BACK button results in an "expired page" or a cache-miss, basically, browser cannot find the page in the cache. 

Any suggestion?

Thx!

Ray Bon

unread,
Apr 10, 2018, 11:59:18 AM4/10/18
to cas-...@apereo.org
Yan,

Accept User Agreement is shown after Login Screen form is POSTed. You can not go back to it from Success Page because that would require resubmitting the login form.
If you really want to be able to go back to Accept User Agreement, you could have a link on Success Page or perform some redirection/javascript reloading of Accept User Agreement. 

Ray
-- 
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | rb...@uvic.ca

Uxío Prego

unread,
Apr 11, 2018, 4:59:06 AM4/11/18
to CAS Community
Yeah take control of the browser back button and send the user to wherever you find appropriate: https://stackoverflow.com/questions/25806608/.

Regards,

Uxío Prego

             

Madiva Soluciones
CL / SERRANO GALVACHE 56
BLOQUE ABEDUL PLANTA 4
28033 MADRID

+34 917 56 84 94
www.madiva.com
www.bbva.com

The activity of email inboxes can be systematically tracked by colleagues, business partners and third parties. Turn off automatic loading of images to hamper it.

--
- 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+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1523375951.1822.11.camel%40uvic.ca.

Yan Zhou

unread,
Apr 12, 2018, 11:08:14 AM4/12/18
to CAS Community

Hello, 

I am using this as an example that CAS flow does not support BACK button. That is not the real problem I am facing. 

We have added a couple more screens in the login flow, such as requiring user to change password if it expires, setting up user when login to CAS for the first time.  Our BACK button is broken right now. Spring Web Flow should support it by default.  

I understand the double-submit problem, that is why there is POST-REDIRECT-GET pattern.

What is in CAS that it overrides Spring Web Flow default behavior and does not support Back button, and I will have to implement "Back" myself on every screen individually?

Yan
Regards,
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

Yan Zhou

unread,
Apr 12, 2018, 4:08:14 PM4/12/18
to CAS Community
I was looking at browser developer tool. 

When I disable cache, BACK button appears working (as far as going back on UI level), but the request is a POST to /cas/login.  Does that mean CAS web flow does not implement POST-REDIRECT-GET pattern, even though it is using Spring Web Flow?  Otherwise, I should be seeing a GET.

Thanks,
Yan
Reply all
Reply to author
Forward
0 new messages