apache / apache/grails-core

Remember me doesn't work correctly with an ajax request

Open
#15,873 4 comments 1 reaction 1 assignee Claimed by @guillermocalvo View on GitHub
relates-to:spring-security
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

* User Logged in with Remember Me
* Session Times out (usually after 30 minutes)
* Left browser window open and proceeds to make Ajax request

Request returns a status code 302 with a redirect to '/login/ajaxSuccess' or whatever is defined as the ajaxSuccessUrl

```
authenticationSuccessHandler(AjaxAwareAuthenticationSuccessHandler) {
requestCache = ref('requestCache')
defaultTargetUrl = '/'
alwaysUseDefaultTargetUrl = false
targetUrlParameter = 'spring-security-redirect'
ajaxSuccessUrl = '/login/ajaxSuccess'
useReferer = false
redirectStrategy = ref('redirectStrategy')
}
```

Correct behavior should be to process the request as normal as the user is already logged in from RemeberMeServices

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.