[Internals] How does the mac app determine the "main" account when multiple accounts are used ?

mickael
mickael
Community Member

Hi,

In my journey in the internals of Lastpass, I discovered that the "main" account was still needed to decrypt data of other associated "accounts".

However, given the table accounts of the B5.sqlite database, what's the right way to determine the "main" account ? The one used to unlock the application.

In my setup this is the one with id == 1, but I doubt this is always the case.

Thanks for the details,

Mickaël


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • @mickael,

    The Master Password of the first added account is what will unlock the 1Password for Mac app.

    The way 1Password unlocks is:

    1. If a Primary vault exists then unlock using the Master Password for that vault, regardless of what, if any, memberships are signed in
    2. If a single 1Password membership is signed in then unlock using the Master Password for that membership account
    3. If multiple memberships are signed in then unlock using the Master Password of the first added membership

    These are each exclusive scenarios. For example, if multiple memberships are signed in, you cannot unlock 1Password using the Master Password of the second account that was added.

    Ben

  • mickael
    mickael
    Community Member

    @Ben, thanks for the really precise answer (as usual)

    With your help, I successfully implemented multi-accounts support in my tool.

  • Lars
    Lars
    1Password Alumni

    @mickael - on behalf of Ben, you're quite welcome! Glad he was able to help. :)

This discussion has been closed.