By default, spring security will send the original request after a successful login. This can be prevented by adding the following to Config.groovy :
grails.plugins.springsecurity.successHandler.alwaysUseDefault = true grails.plugins.springsecurity.successHandler.alwaysUseDefaultTargetUrl = true grails.plugins.springsecurity.successHandler.defaultTargetUrl = '/my/default/url'
Two properties sound as if they should do the same, but in my case it only works when I have both. Perhaps you can remove one of them and make it work ...
This will change the behavior at every login, not just after a timeout. If you need a more dynamic solution, I think you need to insert spring into the security source code ...
moeTi
source share