What’s the normal way to authenticate? @Dragosha
Should I do it at start of the app, or have them press a button to sign into Google Play GS?
function gpgs_callback(self, message_id, message)
if message_id == gpgs.MSG_SIGN_IN or message_id == gpgs.MSG_SILENT_SIGN_IN then
if message.status == gpgs.STATUS_SUCCESS then
print("gpgs.get_id()", gpgs.get_id())
print("gpgs.get_display_name()", gpgs.get_display_name())
if sys.get_config("gpgs.client_id") then
print("id_token: ", gpgs.get_id_token())
print("auth_code: ", gpgs.get_server_auth_code())
end
end
end
print("gpgs.is_logged_in()", gpgs.is_logged_in())
end
function init(self)
if gpgs then
gpgs.set_callback(gpgs_callback)
gpgs.silent_login()
timer.delay(2, false, function()
if not gpgs.is_logged_in() then
gpgs.login()
end
end)
end
end
Not sure what I’m doing wrong. The signin UI shows for a moment then auto-dismisses. I did download
Look, Your Loot! and it seemed to sign in properly.
DEBUG:SCRIPT: gpgs_callback 2
DEBUG:SCRIPT:
{ --[[0x70dc41c2f0]]
status = 2,
error = "Silent sign-in failed"
}
DEBUG:SCRIPT: gpgs.is_logged_in() false
DEBUG:SCRIPT: gpgs_callback 1
DEBUG:SCRIPT:
{ --[[0x70caeae700]]
status = 2,
error = "Sign-in failed"
}
DEBUG:SCRIPT: gpgs.is_logged_in() false
I have the game.project settings mirroring how the example is set up.
The SHA-1 certificate fingerprint stuff looks to match what’s on the console. Same SHA-1 for App signing and the linked app.
Edit:
It’s suddenly working. Only change I made was to not include the client id in the game.project
Achievements work!
Updated version with achievements enabled is live https://play.google.com/store/apps/details?id=com.subsoap.fsr&hl=en_US