spring-boot-starter-parent version 2.7.4 spring-boot-starter-security version 2.7.4
I run my project , and then I open browser visit a page , and then I re-run my project , I do not close browser ,and then I visit the same page , the browser let me login , so I am login , and login successfully , it jump to /error , it does not jump to my last visit page.
my SuccessHandler.
@Component
public class CustomAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler {
@Override
public void onAuthenticationSuccess(HttpServletRequest request,
HttpServletResponse response,
Authentication authentication)
throws ServletException, IOException {
super.onAuthenticationSuccess(request, response, authentication);
}
}
Comment From: marcusdacoregio
Hi @yuanpinhao.
It is not clear to me based on the description how to simulate it. Would you mind reworking the description to be clearer on what is happening? You might consider creating a minimal, reproducible sample.
Comment From: yuanpinhao
Hello,I am yuanpinhao. Good morning. I turned off my computer befere I went to bed last night. Turn on the computer this morning, I found that I did not have the same problem that I had last night. I made a video,it has my procedures in it. It would have gone to /error the second time I opened the browser and logged in,but this time it did not.
@.***
From: Marcus Hert Da Coregio Date: 2022-11-17 02:05 To: spring-projects/spring-security CC: yuanpinhao; Mention Subject: Re: [spring-projects/spring-security] login successfully Error jump (Issue #12217) Hi @yuanpinhao. It is not clear to me based on the description what is the problem and the steps to simulate it. Would you mind reworking the description to be clearer on what is happening? ― Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Comment From: marcusdacoregio
Without much information, I would say that when you restart your application all your sessions are destroyed. The SavedRequestAwareAuthenticationSuccessHandler uses a HttpSessionRequestCache by default, therefore, the request that was saved in the session before is now gone with the session.
With that said, it feels like this is a question that would be better suited to Stack Overflow. As mentioned in Getting Support, questions should be submitted to StackOverflow. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.