Can't reconnect to the server after restart due to failed auth #7

Closed
opened 2026-02-05 16:38:42 +03:00 by OVERLORD · 14 comments
Owner

Originally created by @n1m8 on GitHub (Jan 13, 2026).

When the server is first made and authenticated I can connect and play. After a restart, trying to connect shows an error: "Failed to obtain authorization grant from session service".

Console output: [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token

I'm guessing it's something to do with the new auth caching unless I'm missing something obvious?

Originally created by @n1m8 on GitHub (Jan 13, 2026). When the server is first made and authenticated I can connect and play. After a restart, trying to connect shows an error: "Failed to obtain authorization grant from session service". Console output: [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token I'm guessing it's something to do with the new auth caching unless I'm missing something obvious?
Author
Owner

@MiguVT commented on GitHub (Jan 13, 2026):

have you made the auth persistent? check the docs of hytale server

@MiguVT commented on GitHub (Jan 13, 2026): have you made the auth persistent? check the docs of hytale server
Author
Owner

@n1m8 commented on GitHub (Jan 13, 2026):

I've checked the docs but I'm not sure how to go about making the auth persistent, I thought that was what the latest egg update did.

@n1m8 commented on GitHub (Jan 13, 2026): I've checked the docs but I'm not sure how to go about making the auth persistent, I thought that was what the latest egg update did.
Author
Owner

@minefreak commented on GitHub (Jan 13, 2026):

The problem it's from egg, for me same problem: Console output: [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token

@minefreak commented on GitHub (Jan 13, 2026): The problem it's from egg, for me same problem: Console output: [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token
Author
Owner

@MrLuckyGamer commented on GitHub (Jan 13, 2026):

Are you both using the latest egg, and have reinstalled your servers, are you using Pelican or Pterodactyl, I am not getting this error you guys are getting.

@MrLuckyGamer commented on GitHub (Jan 13, 2026): Are you both using the latest egg, and have reinstalled your servers, are you using Pelican or Pterodactyl, I am not getting this error you guys are getting.
Author
Owner

@minefreak commented on GitHub (Jan 13, 2026):

I have the pterodactyl server, and yes i reinstall the all server and i have this issue

@minefreak commented on GitHub (Jan 13, 2026): I have the pterodactyl server, and yes i reinstall the all server and i have this issue
Author
Owner

@n1m8 commented on GitHub (Jan 13, 2026):

Are you both using the latest egg, and have reinstalled your servers, are you using Pelican or Pterodactyl, I am not getting this error you guys are getting.

I'm using pelican. I completely deleted the previous server and egg and reinstalled them and then ran into this issue. It was working before when I had to reauthenticate manually each time, but now I get the 403

@n1m8 commented on GitHub (Jan 13, 2026): > Are you both using the latest egg, and have reinstalled your servers, are you using Pelican or Pterodactyl, I am not getting this error you guys are getting. I'm using pelican. I completely deleted the previous server and egg and reinstalled them and then ran into this issue. It was working before when I had to reauthenticate manually each time, but now I get the 403
Author
Owner

@EliteScouter commented on GitHub (Jan 13, 2026):

Same issue here.

Pterodactyl, if I remove the .hytale-auth-tokens.json and authenticate for the first time, everyone can connect.

On restart it gives everyone [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token

@EliteScouter commented on GitHub (Jan 13, 2026): Same issue here. Pterodactyl, if I remove the .hytale-auth-tokens.json and authenticate for the first time, everyone can connect. On restart it gives everyone [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token
Author
Owner

@MrLuckyGamer commented on GitHub (Jan 13, 2026):

Same issue here.

Pterodactyl, if I remove the .hytale-auth-tokens.json and authenticate for the first time, everyone can connect.

On restart it gives everyone [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token

Continue to use this as a temp fix for now, ill try and fix the caching as there is issues there.

@MrLuckyGamer commented on GitHub (Jan 13, 2026): > Same issue here. > > Pterodactyl, if I remove the .hytale-auth-tokens.json and authenticate for the first time, everyone can connect. > > On restart it gives everyone [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token Continue to use this as a temp fix for now, ill try and fix the caching as there is issues there.
Author
Owner

@MiguVT commented on GitHub (Jan 13, 2026):

Are you both using the latest egg, and have reinstalled your servers, are you using Pelican or Pterodactyl, I am not getting this error you guys are getting.

Tried for first time and its happening to me
[2026/01/13 18:07:30 WARN] [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token

@MiguVT commented on GitHub (Jan 13, 2026): > Are you both using the latest egg, and have reinstalled your servers, are you using Pelican or Pterodactyl, I am not getting this error you guys are getting. Tried for first time and its happening to me [2026/01/13 18:07:30 WARN] [SessionServiceClient] Failed to request authorization grant: HTTP 403 - invalid token
Author
Owner

@EliteScouter commented on GitHub (Jan 13, 2026):

I was able to get the caching to work

Original script cached session_token and identity_token and reused them, the modification caches only refresh_token + profile_uuid and mints a new game session every boot.

@EliteScouter commented on GitHub (Jan 13, 2026): I was able to get the caching to work Original script cached session_token and identity_token and reused them, the modification caches only refresh_token + profile_uuid and mints a new game session every boot.
Author
Owner

@MiguVT commented on GitHub (Jan 13, 2026):

I was able to get the caching to work

Original script cached session_token and identity_token and reused them, the modification caches only refresh_token + profile_uuid and mints a new game session every boot.

make a PR fixing it (or tell me to do that and will do it :D)

@MiguVT commented on GitHub (Jan 13, 2026): > I was able to get the caching to work > > Original script cached session_token and identity_token and reused them, the modification caches only refresh_token + profile_uuid and mints a new game session every boot. make a PR fixing it (or tell me to do that and will do it :D)
Author
Owner

@EliteScouter commented on GitHub (Jan 13, 2026):

I was able to get the caching to work
Original script cached session_token and identity_token and reused them, the modification caches only refresh_token + profile_uuid and mints a new game session every boot.

make a PR fixing it (or tell me to do that and will do it :D)

Done!

#11

@EliteScouter commented on GitHub (Jan 13, 2026): > > I was able to get the caching to work > > Original script cached session_token and identity_token and reused them, the modification caches only refresh_token + profile_uuid and mints a new game session every boot. > > make a PR fixing it (or tell me to do that and will do it :D) Done! #11
Author
Owner

@Kile467 commented on GitHub (Jan 13, 2026):

What happened? Have you closed the PR? @EliteScouter

@Kile467 commented on GitHub (Jan 13, 2026): What happened? Have you closed the PR? @EliteScouter
Author
Owner

@EliteScouter commented on GitHub (Jan 13, 2026):

What happened? Have you closed the PR? @EliteScouter

I am fixing it. There was a commit 10 mins after I made the change and it never got merged. 1 minute.

@EliteScouter commented on GitHub (Jan 13, 2026): > What happened? Have you closed the PR? [@EliteScouter](https://github.com/EliteScouter) I am fixing it. There was a commit 10 mins after I made the change and it never got merged. 1 minute.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/egg-hytale#7