Skip to content
Game Servers

Fix Minecraft "Failed to Login: Invalid Session"

Failed to login: Invalid sessionBad loginInvalid session (try restarting your game)
7 min read Updated 12 June 2026 ESAGAMES Team

"Invalid session" means the server asked Mojang/Microsoft to verify your account and the check failed — usually a stale login session. Here's the quick client fix and the server-side cause.

"Invalid session" is almost always a stale login token on the player's side, and it clears in seconds. If it hits every player at once, it's the server's online-mode instead. The fix in order:

  1. Fully close Minecraft and the launcher (not just the game window).
  2. Reopen the launcher and let it re-authenticate your Microsoft account.
  3. Rejoin the server.
  4. Still failing? Sign out of your Microsoft account in the launcher and sign back in for a fresh token.
  5. If EVERY player fails at once, it's server-side — check online-mode (below).

The instant fix: restart the launcher

Nine times out of ten this is a stale session token. Fully close the Minecraft launcher and the game, reopen the launcher, and let it re-authenticate your Microsoft account. Then rejoin.

Still failing? Re-login your account

Sign out of your Microsoft account in the launcher and sign back in to force a fresh token. This clears a session that expired in the background.

The server side: online-mode

Servers with online-mode=true (the default) verify every player with Mojang. That's correct and secure. If the server runs online-mode=false (offline/cracked), authentication is skipped entirely — which has real downsides:

# server.properties
online-mode=true   # verifies accounts (recommended)
Why keep online-mode on

online-mode=false lets anyone join under any username — including impersonating your admins — and offers no account security. Keep it true unless you specifically need offline play, and even then use a whitelist.

Other quick checks

  • Check the Mojang/Minecraft services aren't down.
  • If you just changed your username, wait — the change can take time to propagate.
  • Make sure your system clock is correct (a wrong clock breaks auth).
"Invalid session" is a stale login. Restart the launcher to re-authenticate — it fixes it almost every time.

Why "Invalid session" keeps coming back

If restarting the launcher only fixes it briefly and the error returns, the usual culprits are a firewall, antivirus or VPN interfering with the launcher's connection to Microsoft's authentication servers, or a proxy that blocks the auth handshake. Test with the VPN/proxy off and add the launcher as an exception in your security software.

"Bad login" vs "Invalid session"

Both point at the same account-verification failure, but "Bad login" more often shows up on older/third-party launchers or when a server can't reach Mojang's session servers at all. On the server side, confirm outbound access to Minecraft's authentication endpoints isn't blocked by a firewall — a locked-down VPS can trigger this for every player at once.

How to prevent login and session errors

  • Keep your launcher and game updated so token handling stays current.
  • Keep the server's system clock synced with NTP — a drifted clock breaks authentication server-wide.
  • Leave online-mode=true and add a whitelist rather than switching to offline mode to "solve" login errors.
  • Ensure the server can reach Mojang/Microsoft auth servers outbound if you run a tightly firewalled VPS.

Related Minecraft join errors

If the server rejects your name specifically, see Minecraft failed to verify username. For version mismatches, read outdated server / client. If the connection drops rather than the login failing, see internal exception: timed out and io.netty connection refused.

Secure, easy Minecraft hosting

Our Minecraft hosting runs online-mode with whitelist controls and one-click setup, protected in Frankfurt.

Minecraft hosting
FAQ

Frequently asked questions

How do I fix "Failed to login: Invalid session"?

Fully close the game and the launcher, reopen the launcher so it re-authenticates your Microsoft account, then rejoin. If that fails, sign out and back in to force a fresh session token.

Is "invalid session" a server problem?

Usually not — it's your login session that's stale. But a server running online-mode in a misconfigured way, or Mojang services being down, can also cause it. Restart the launcher first.

Should my server use online-mode=false?

Only if you specifically need offline play, and even then add a whitelist. online-mode=false skips account verification, so anyone can join under any name, including impersonating staff. Keep it true when you can.

Why does "invalid session" happen to everyone on my server at once?

That points to the server itself, not individual players — usually Mojang/Microsoft authentication services being down, or the server being unable to reach those auth endpoints because of a firewall. Check the service status and the server's outbound access.

Can a VPN cause "Failed to login: Invalid session"?

Yes — a VPN or proxy can interfere with the launcher's handshake with Microsoft's auth servers. Disable it and re-launch to test whether that's the cause before troubleshooting further.

Does a wrong system clock really break Minecraft login?

Yes. Authentication relies on time-sensitive tokens, so a clock that's off by more than a few minutes can make the session verification fail. Sync your clock (and the server's, via NTP) and retry.

What's the difference between "Invalid session" and "Bad login"?

They stem from the same account-verification failure. "Invalid session" is the modern launcher's wording; "Bad login" tends to appear on older or third-party launchers or when the server can't reach Mojang's session servers at all.

Further reading

Go deeper on this

Guides and explainers that pair with this fix — from our guides and blog.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney