How to redirect user to login on successful completion of a custom required action?

Hi,

I have created a custom required action to reset the password of the user. It also supports the application initiated action flow. The required action works as expected but, I want the user to re-authenticate with the
new password.
I have tried

context.getAuthenticationSession().getParentSession().restartSession(context.getRealm());

and

context.getAuthenticationSession().getParentSession().createAuthenticationSession(authSession.getClient());

with no success.
Is there any way to redirect the user to the login screen from the Required Action Context?

Were you able to resolve this.

Again, Were you able to resolve this?
I’m trying to do the exact same thing.

Yes you can definitely redirect user to login using authenticaionflow using authenticationFlowContext.form().createLoginUsernamePassword()