NAM MFA plugin end landing page issue

Hi ,

I am currently facing an issue related to MFA(Email OTP) flow which configured using plugin approach with NAM.

We are using custom contract as default contract for all logins. For MFA flow, i have configured custom EMailAuth.jsp & PluginErrorPage.jsp and login is working fine.

Also when user logon process has expired and if i am trying to submit or resend the OTP, then it is showing error message (PluginErrorPage.jsp).

but if i am trying to refresh this error page then it is showing below page instead of default contract and this issue is showing in case of custom jsp files. With the NAM default files, flow is working fine and it is landing to login page.

Observations : Once comparing the both default and custom file flow, I have noticed that incase of NAM default flow, NAM is forwarding to login.jsp page when user is refreshing the page as below

Forwarding to JSP: /jsp/login.jsp </amLogEntry>

but incase of custom jsp files, NAM is forwarding user to LdapAuth.jsp file.

Forwarding to JSP: /jsp/LdapAuth.jsp </amLogEntry>

So any advice on this would be really helpful.