Search Unity

Resolved Plastic is using wrong login

Discussion in 'Unity Version Control' started by demiurge180, May 1, 2022.

  1. demiurge180

    demiurge180

    Joined:
    Apr 29, 2020
    Posts:
    21
    So I have two Unity logins, my personal one and my work one.
    I've been logged into my personal one for quite a while, on the website and in the Hub, etc.
    First time I've *ever* tried to use Plastic in any context, was in Unity just now, and it said it was already logged in. Strange because I didn't have an account with my personal email.

    When I created the workspace, checking out the different tabs I saw the repo was created by my work login. I found the .plastic folder inside App Data/Local and deleted that, no change. I tried to launch the Plastic client, why it was already installed I have no clue, but I sign out, use Sign In with Unity ID, and magically I'm signed in again with the work email.

    So I go to Plastic's website and sign in with Unity after logging out and in, in the Hub and the Unity website. Plastic now correctly creates an account with my personal email.
    I delete the project (literally brand new project), recreate it, open the Plastic window, it says it's already signed in, so I create the workspace.
    And lo and behold again it's using my work account.

    Help?
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @demiurge180, I'm sorry that you're having issues switching between your Plastic accounts. We are in the process of revamping the onboarding process and making it easier to switch between different Plastic accounts via the GUI client. But for now, here's how the Unity SSO login process works for Plastic SCM.

    As you had mentioned in your second paragraph, the first thing that needs to be set when you want to log into Plastic SCM with a specific Unity account is to log in to that account first on the Unity website (not just on the Hub). That is where Plastic SCM checks which Unity account you're currently using.

    After that, log into the Plastic website using Unity SSO, which will use the account you've logged into on the Unity site. If an account hasn't been made yet, it'll make one for you automatically.

    With that, here's where things got tripped up. Because you had logged into the Plastic SCM client already, you were still logged into your work Plastic account because it only asks which account you want to log in with during its initial setup (the Unity Plugin does the same thing). To retrigger the lookup of which Plastic account you are logged in with on the website, you need to delete your client.conf file and then reopen the Plastic SCM client or the Unity Editor with the Plastic workspace you'd like to work in. Plastic SCM will then re-query the site, see that you're logged into Plastic with your personal account, and let you choose one of the Plastic organizations associated with that personal account to assign your workspace to.

    Let me know if this unblocks you and I'm sorry for the confusion. We'll definitely aim to make this process more straightforward in the new onboarding process.
     
    demiurge180 likes this.
  3. demiurge180

    demiurge180

    Joined:
    Apr 29, 2020
    Posts:
    21
    Sorry it took me so long to get to it but I just did, and it worked! The plugin asked me to login or create account, then opened up the login choice for email or Unity ID, and after that it's got the correct account.

    Thanks!
     
    Ryan-Unity likes this.