here in my case. in this method
onAuthenticationSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) throws IOException, ServletException {
final RequestCache requestCache = new HttpSessionRequestCache();
final SavedRequest savedRequest = requestCache.getRequest(request, response);
i am getting savedRequest is NULL how to get my expected result
In CheckoutLoginController.java
,
add private static final String REFERER = "referer";
In doCheckoutLogin
method, add request.getSession().setAttribute("redirectTargetUrl", request.getHeader(REFERER));
After this, the request will be added to the session.