Can't auto-login to your alt? This might help...

Discussion in 'General Minecraft Discussion' started by ShelLuser, Dec 13, 2015.

  1. Hi gang!

    So yesterday I got an ALT named GRIPCEO. All was well, I logged on and claimed my residence and all. Perfect. Obviously my main account is this one, ShelLuser, and that's the one which will be fully active.

    Now; the launcher allows you to switch between accounts. So after firing it up I can select "switch user" (bottom right corner of the launcher) after which I get to see my name and GRIPCEO in a pull down menu. So this morning I tried to log back onto GRIPCEO (I plan to log on at least once a week to prevent going derelict. Kinda useless to use vouchers on an alt IMO) and for some reason I couldn't. I got an error saying "Invalid token".

    The problem...

    I grabbed my username / password to log on normally and no problem at all. However, now I was logged on as 3 different players and I could only switch to my main account. Every time I tried to switch to GRIPCEO I got an error message about an invalid token.

    So I searched the Net and I discovered that this isn't normal behavior; you should always be able to instantaneously switch between your accounts.

    Fixing the token problems

    All your profiles and account details are stored in a file called launcher_profiles.json, you'll find it in your Minecraft games folder. It's a plain text file (so you can open it up with notepad or any other text editor) and uses the JSON format.

    But first off... If you're going to follow my examples: make a backup copy! On Windows all you need to do is to merely press control-c and conrol-v and you got an instant copy. So if you mess up then you can always move back to where you were.

    Open the file and you'll see something like this:

    Code:
    {
      "profiles": {
        "OptiFine": {
          "name": "OptiFine",
          "lastVersionId": "1.8.8-OptiFine_HD_U_F5"
        },
        "Stable 1.7.10": {
          "name": "Stable 1.7.10",
          "lastVersionId": "1.7.10",
          "allowedReleaseTypes": [
            "release",
            "snapshot"
          ]
        },
    
    Of course your file will look different depending on what profiles you set up. But this is not the section we're looking for, we need to look at the bottom of the file:

    Warning: Never share any information from this file with other players. Some information in there (like your username and client or access tokens) could be abused to force-gain access to your account. So never do that!

    This is also why I forged and hid plenty of my file:

    Code:
      "selectedProfile": "Stable",
      "clientToken": "a-really-large-number",
      "authenticationDatabase": {
        "dab769331b954370a95062bfed38ed7a": {
          "displayName": "ShelLuser",
          "accessToken": "asupersecrethexnumbertoken",
          "userid": "areallycoolhexnumber",
          "uuid": "dab76933-1b95-4370-a950-62bfed38ed7a",
          "username": "myname@mydomain.ext"
        },
        "demo-04804820984aa8809b": {
          "displayName": "GRIPCEO",
          "accessToken": "anothersupersecrethexnumbertoken",
          "userid": "anotherreallycoolhexnumber",
          "uuid": "ba262173-144b-46b5-a734-2e2bc129313f",
          "username": "myothername@mydomain.ext"
        }
    },
    
    See something weird up there?

    This section consists of several parts: one for each account. Note the UUID: this is a unique hex number which identifies your account and which is key to support name changes (instead of a name you're known by a number).

    In the first section the opening number is identical to my UUID but without the dashes in between. In the second example the numbers are different. Not sure what happened but it literally started with 'demo'. So here's what I did... I replaced the number with the UUID (but without the dashes). Then I started Minecraft again and tried to log on. Initially this failed, so I had to re-log, but after that I could finally switch instantly between ShelLuser & GRIPCEO.

    So if you're having problems like mine then definitely check out this file first.

    If you have any questions be sure to ask, but keep the above in mind: careful with sharing any information from this file! Best is if you don't!
  2. the proper way mojang wants you to do this is to keep your launcher open when you load the game, and use the same launcher. this wont invalidate your previous token

    using a new launcher instance is the problem.

    or, use magic launcher and not suffer any problems :p
  3. Interesting, thanks for the input. I never tried that.

    But this small change fixed things. Right now I can fire up the game as my main. Then start the launcher again and switch to whatever I need :)