Your session has expired when directly logging into a locally started API Server

When I start the "ImxClient.exe run-apiserver -B'" and login: http://localhost:8182
The following is displayed: Your session has expired. Reload this page and log in again. [57002006]
Indirectly via Angular (http://localhost:4200/) it all works fine (clientUrl: 'http://localhost:8182',)

I there a way to make directly logging into a locally started API Server work?

This post contains a work-around, but also ends with the same question I have.
www.oneidentity.com/.../not-able-to-log-into-angular-development-environment-after-cu2

Thank you,
Niels

  • Hi Niels,

    It does not like getting credentials from a Global.cfg or from the signin prompt. Maybe because it encrypts them and cannot/doesn't decrypt it runtime? You either have to store your connection in your registry, or (easier) give it both a connectionstring (/conn argument) and and the authentication string (/dialog argument) as arguments to the imxclient command. For example:


    $connectionstring = "Data source=127.0.0.1;Initial Catalog=OneIM;User ID=OneIM_Admin;Password=TEST;Pooling=False"
    $authstring = "Module=RoleBasedADSAccount"
    .\imxclient.exe run-apiserver -B /dialog $authstring /conn $connectionString

    The AuthString must be a valid auth string with sufficient credentials. It can also be a DialogUser authentication string:

    $authstring = "Module=DialogUser;User=johndoe;Password=password"

    There are some examples in "imxclient.exe.config", so maybe it is even sufficient to put authstring and connstring there? I have not tried.

    Cheers,

    Sebastian