This extension provides functions to use Sign in with Apple to allow users to set up an account and sign in to your game with their Apple ID.
To use this library in your Defold project, add the following URL to your
We recommend using a link to a zip file of a specific release.
To get started you need to enable your app’s App ID with the Sign in with Apple capability. Follow the official Apple developer instructions to get started.
if siwa.is_supported() then print("Sign in with Apple is supported") end)
siwa.authenticate(id, function(self, data) print(data.identity_token) print(data.user_id) print(data.first_name, data.family_name) print(data.email) if data.user_status == siwa.STATUS_LIKELY_REAL then print("Likely a real person") end end)
siwa.get_credential_state(id, function(self, data) if data.credential_state == siwa.STATE_AUTHORIZED then print("User has still authorized the application", data.user_id) elseif data.credential_state == siwa.STATE_REVOKED then print("User has revoked authorization for the application", data.user_id) end end)
The source code is available on GitHub