Switching Organisations

A OnePub member can belong to multiple organisations.
This can be useful as it allows you to have a personal OnePub account as well as multiple work accounts if you are a contractor.
To switch between organisations, click on the profile icon in the top right-hand corner of the OnePub website.
Click the 'Switch' button on the profile dialog and select the desired organisation.

Sticky Organisation

Once you switch to an organisation, each time you return to the OnePub site you will be logged into the same organisation until you once again switch organisations.

Switching organisation on the CLI

When working from the CLI you can switch organisations by running the onepub login command.
The login command will prompt you to select the organisation you want to log in to.
From the CLI, you can actually be logged into multiple organisations simultaneously. This allows you to move between dart projects and run the likes of 'dart pub get' without having to switch organisations.

Active Organisation

There is however a concept of an 'active' organisation. The active organisation is the last one you logged into on the CLI. You can view the active organisation by running onepub doctor.
When you run commands such as onepub pub private or onepub pub add the active organisation is used.
Run onepub login to switch to an alternate active organisation.

Join an organisation

If you want to join a new organisation you must first receive an invitation to that organisation. Once you have accepted the invite you can then switch to the new Organisation.