How do I sign in to several domains or as a different user?

Prev Next

If you work in more than one LUSID domain, such as a test domain and a production one, LumiCode can keep a sign-in for each, so moving between them is a single word when you start LumiCode. You can also sign in to the same domain as somebody else, for example to check what a colleague or a service user can see.

Prerequisites

How profiles work

Each time you sign in with lumi login, LumiCode saves the sign-in as a profile: a name, a LUSID domain, and how you sign in to it. The first profile you save is called default, and it becomes the active profile, which lumi uses unless you name another. The banner at the top of LumiCode shows the domain and profile you're using.

Name the profile for a new domain

lumi login without --profile signs in to the active profile. Running lumi login --domain <another-domain> on its own changes your active profile to the other domain, rather than adding a new one. To keep both, always give a new domain its own profile name, as in Method 1.

Methods

Method 1: Add a profile for another domain

  1. In a terminal, sign in to the other domain under a new profile name. For example, for a test domain:

    lumi login --profile test --domain <your-test-domain>.lusid.com
  2. If the domain lets you sign in with your company credentials, LumiCode asks how you sign in. Choose Use your company credentials, or Sign in with a username and password.

  3. Sign in in the browser window that opens. LumiCode confirms the domain, the user and the profile name.

You only need to do this once for each domain. Your existing profiles, and which one is active, stay as they were.

Method 2: Start LumiCode with a profile

  • To use the active profile, type lumi.

  • To use another, name it: lumi --profile test.

To work in two domains at once, open a second terminal window or tab and start LumiCode with the other profile there. Each session uses its own profile, and the banner shows which is which.

To see the profiles you have, run lumi config. It lists each profile with its domain, and marks the active one.

To change the active profile, run lumi config use <profile> .

Method 3: Sign in as a different user

Your browser remembers who you last signed in as, so signing in again usually brings you straight back as the same person. To sign in as somebody else:

  1. Run lumi login --switch-user. Add --profile <name> for a profile other than the active one.

  2. LumiCode signs you out of your company's sign-in page first, then opens it again. Sign in as the other user.

The profile now signs in as that user. To keep your own sign-in as well, give the other user a profile of their own instead, for example lumi login --switch-user --profile colleague --domain <your-domain>.lusid.com.

Troubleshooting

Signing in again didn't change who I am

Your browser signed you straight back in as the same user. Use lumi login --switch-user, as in Method 3.

"No profile ... is configured"

The profile name you gave doesn't exist yet, or is spelled differently. Run lumi config to see your profiles, or sign in with lumi login --profile <name> --domain <domain> to create it.

LumiCode says FBN_ACCESS_TOKEN is set

When the FBN_ACCESS_TOKEN environment variable holds a personal access token, LumiCode uses that token instead of your sign-in, so changing who you sign in as changes nothing. Clear the variable, then start LumiCode again.