Linking SAML account and want to require user to enter password before linking

Hi Teodor, thank you for responding. The problem is this infinite loop doesn’t even let the code get to the account linking part, so this will not be reached. They go from entering their email address (where we also have Home Realm Discovery turned on so we can detect when to send them to their IDP to sign in), to getting sent back to the universal login page, and then get sent back to the IDP sign in.

Here’s more context: As I mentioned above, before linking accounts, I would like to have the user reenter their old account credentials. The following line is the last line called in exports.onExecutePostLogin, and appDomain is set to our universal login page:

api.redirect.sendUserTo(event.secrets.appDomain, {
      query: {
        session_token: sessionToken
      }
    });