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.
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.
When working from the CLI you can switch organisations by running the
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.
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
When you run commands such as
onepub pub privateor
onepub pub addthe active organisation is used.
onepub loginto switch to an alternate active 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.