I’m having issues with integrating Steam authentication into my project. Initially it was sporadic, but as of now it is a constant issue. Steam is loading and verifying correctly however when I pass the ticket to Nakama I get a 101 Invalid Ticket error. Previously I was retrying the ticket authentication up to three times and it would occasionally work however now I cannot get Steam to authenticate at all. The publisher key and AppId are both valid and updated.
Godot function that gets auth ticket and passes to Nakama
func validate_auth_session_async(steam_id: int) -> int:
_auth_ticket = Steam.getAuthSessionTicket()
var response: int
var auth_response: int = Steam.beginAuthSession(_auth_ticket.buffer, _auth_ticket.size, steam_id)
# Get a verbose response; unnecessary but useful in this example
var verbose_response: String
match auth_response:
0: verbose_response = "Ticket is valid for this game and this Steam ID."
1: verbose_response = "The ticket is invalid."
2: verbose_response = "A ticket has already been submitted for this Steam ID."
3: verbose_response = "Ticket is from an incompatible interface version."
4: verbose_response = "Ticket is not for this game."
5: verbose_response = "Ticket has expired."
print("Auth verifcation response: %s" % verbose_response)
if auth_response == 0:
print("Validation successful, adding user to client_auth_tickets")
_client_auth_tickets.append({"id": steam_id, "ticket": _auth_ticket.id})
var auth_ticket_string := ''
for i in range(_auth_ticket['size']):
auth_ticket_string += "%02x" % _auth_ticket['buffer'][i]
response = yield(_authenticator.authenticate_steam_async(auth_ticket_string), "completed")
if response == 0:
_storage_worker = StorageWorker.new(_authenticator.session, _client, _exception_handler)
else:
print("Auth error: %s" % response)
return response
# You can now add the client to the game
Nakama Error in Console
dev-nakama-1 | {"level":"debug","ts":"2024-06-20T03:44:53.118Z","caller":"social/social.go:633","msg":"Error returned from Steam after requesting Steam profile","errorDescription":"Invalid ticket","errorCode":101}
dev-nakama-1 | {"level":"info","ts":"2024-06-20T03:44:53.118Z","caller":"server/core_authenticate.go:764","msg":"Could not authenticate Steam profile.","error":"Invalid ticket, 101"}
- Versions: Nakama {1.30.1 / 3.20.0}, {Docker}, {Godot 3.5.3}
- Server Framework Runtime language (If relevant) {Go, Lua}