⚔️ Valheim 1.0 is out: 25% off with codeSP25
MinecraftMinecraft·Troubleshooting

Fix "Failed to Verify Username" in Minecraft

Fix Failed to verify username and Invalid session in Minecraft: restart the launcher, log in again, and why turning off online-mode puts your server at risk.

Noah
·
7 min read
·
September 25, 2026
Table of Contents

Failed to verify username! and Failed to login: Invalid session are two of the most common messages a Minecraft player runs into, and they almost never mean something is wrong with the server. They mean the login check between your game, Microsoft's account servers and the Minecraft server did not go through. This guide explains what that check is, how to fix it from the player's side, and why switching the check off is rarely the answer.

What is being checked

When online-mode is on, which is the default, every player who joins goes through the same short handshake:

  1. Your game tells Mojang's session servers that you are about to join this server, using your login session
  2. The server asks the same session servers whether that really happened
  3. If both sides agree, you are in. If not, the server refuses you

This is what proves you own the account you are playing on. It also gives every player a permanent ID (UUID) tied to their account, which is what the server uses for inventories, bans, operators and the whitelist.

The two messages point at different sides of that handshake:

Message What it usually means
Failed to login: Invalid session (Try restarting your game and the launcher) Your game's login session has expired or is no longer valid
Failed to verify username! The server asked the session servers, and they could not confirm you

Fixes for players

Work through these in order. The first two solve most cases.

  1. Restart the game and the launcher. Close Minecraft completely, then close the launcher as well, not only the game window. Start the launcher again and join. This renews your session
  2. Log out and back in. In the launcher, sign out of your Microsoft account, sign in again and relaunch. Sessions expire on their own after a while, especially if the game or launcher has been open for a long time
  3. Check that you use the right account. If you have more than one account in the launcher, make sure the one you picked actually owns Minecraft Java Edition
  4. Wait a few minutes if everyone is affected. When several players get the message at the same time on different servers, the account or session services are having trouble. There is nothing to fix on your side or ours, and it usually clears up on its own. Mojang and Microsoft post outages on their official status channels
  5. Check your connection. A VPN, strict firewall or DNS filter that blocks Mojang's or Microsoft's services on your side can break the session check. Try without it

If a single player has the problem and the rest can join fine, the cause is almost always on that player's side, and steps 1 and 2 fix it.

Why not just turn online mode off?

The setting that runs the check is online-mode. In our panel you find it in the Config tab under Players, labelled Online mode, and it is also the online-mode line in server.properties. Turning it off does make the error go away, because the server stops asking. It also removes the only thing that proves who a player is.

With online mode off:

  • Anyone can join as anyone. A player can type any name, including yours or an operator's, and the server believes it. If that name is opped, they get operator powers
  • The whitelist stops protecting you. The whitelist checks names and IDs, and in offline mode both come from whatever name the player types. Knowing a whitelisted name is enough to get in
  • Existing players lose their data. Offline mode gives each player a different ID than their real account, so the server treats everyone as a new player. Inventories, positions, ender chests and advancements seem to vanish, and ops and bans set on the real IDs no longer match. Turning online mode back on later reverses it, and anything built up in offline mode is then tied to the offline IDs
  • Skins stop working properly. Players typically show up with default skins
  • Bans are easy to dodge. A banned player can come back under a new name straight away

In short, only turn it off if you know exactly why. The field's own hint says the same: turn it off only for cracked or proxy setups.

Proxy setups: the one legitimate case

On a network running Velocity or BungeeCord, players connect to the proxy, and the proxy passes them on to the backend servers. Here the rules change:

  • The proxy keeps online mode on and does the login check
  • The backend servers have online-mode=false, because the proxy already verified the player
  • Player forwarding must be set up, so the backends receive each player's real name and ID from the proxy. On Paper this is Velocity modern forwarding (configured in the Paper settings together with the proxy's secret) or BungeeCord mode in spigot.yml

If forwarding is missing, the backends see offline IDs and you get all the data problems above. With BungeeCord-style forwarding, anyone who can connect to a backend directly could also pretend to be any player, so use Velocity modern forwarding with a secret where you can, and never tell players the backend addresses.

Players on such a network always join through the proxy's address. Joining a backend directly is a common reason for login errors on proxy networks.

Crossplay is not a reason either

Letting Bedrock players join a Java server does not require turning online mode off. Geyser together with Floodgate lets Bedrock players in on their Xbox accounts while Java players keep the normal check.

Checking the setting

  1. Open the game panel and select your Minecraft server
  2. Go to the Config tab
  3. Under Players, make sure Online mode is switched on (unless the server is a proxy backend)
  4. Restart the server if you changed it. The tab reminds you: Changes apply after a restart.

Troubleshooting

Only one player gets the message. It is their session. They should restart the game and the launcher, then log out and back in.

Everyone gets it at once. Most likely a Mojang or Microsoft service problem. Wait and try again. If it continues for a long time while other servers work, contact us.

It started after I set up a proxy. Check that players join through the proxy and that forwarding is configured on both the proxy and each backend.

Players can join, but their inventories are empty. Online mode was switched off or on, so their IDs changed. Switch it back to what it was before, and restore a backup if data was already overwritten.

Frequently asked questions

Is this error caused by the server host? Very rarely. The session check happens between the game and Mojang's services. The server only asks for the result.

Can non-premium (cracked) players join with online mode on? No. Online mode only lets in players whose Microsoft account owns Minecraft: Java Edition.

Do I need to restart after changing online mode? Yes. It is read when the server starts.

Still getting it? Open a ticket from the support page with your server name, the exact message and whether it affects one player or everyone. Looking for a server? See our Minecraft server hosting plans.

Minecraft

Ready to play Minecraft?

Get your own server running in minutes.

More Minecraft guides