I understand that you have issues with calling both the logout() and loginWithRedirect() functions.
From what I understand, this sounds like forcing re-authentication. In this case, you could call the loginWithRedirect() function with the prompt=login parameter.
thank you rueben, but if I understand it correctly, loginWithRedirect with a prompt=login won’t end the user session. What I want is to first end the current user session (aka logout) and after that automatically redirect them to login and, once they log in, automatically redirect to the /xyz url . How can I do that?
'Update: ok I got it working, just not sure how to validate the reauthentication using auth_time…