Skip to navigation

Remote Scripts

Suppose a desktop game lets its developer change a weekly challenge without shipping a new game build. The developer can publish a small Lua file in AuthlyX. The game fetches the text after sign-in, verifies the AuthlyX signature, then passes the text to its own Lua interpreter.

AuthlyX stores, signs and delivers the text. AuthlyX does not run it. The application decides whether the text is code, configuration or something else, and how to handle it.

Developer writes challenge.lua Publish revision in dashboard AuthlyX stores and signs that revision Game signs in and fetches script SDK verifies signature and app binding Game chooses to pass verifiedtext to Lua

Publish and fetch a script

  1. Open App Data → Scripts for the app and create a stable name such as weekly_challenge.
  2. Save and review the text, then publish a revision.
  3. In the signed-in app, call getScript("weekly_challenge").
  4. Use the returned text only after the SDK verifies the signed response.
  5. Test the new revision with a test identity before releasing your app’s update.

The SDK returns text. It does not know whether that text is Lua, JSON, a rules file or another format. Your app must parse it and decide what to do. A small example for a Lua-enabled game might look like:

return {
challenge = "collect_10_items",
reward = 250
}

Only a game that already includes a Lua interpreter and code to read these fields can use that example. A normal C# or C++ app will not run it automatically.

Choose scripts when

  • Your app already has a safe interpreter or parser for the content.
  • You need to update a rules file or challenge text without replacing the whole application.
  • You understand that customers can inspect anything delivered to their device.

Use Cloud Variables for simple shared values such as a maintenance message or download URL. Use a Script when the app needs a larger structured file or code text for an interpreter it already contains.

Limit older revisions

Each publish creates a revision. You can require a minimum app version or minimum script revision, and withdraw a revision to stop new downloads of it. A customer may still have a copy they fetched earlier; withdrawal cannot erase it from their disk.

Before publishing a replacement, test it with the app versions that will fetch it. If a revision is broken, withdraw it and publish a fixed revision. Do not make your app depend on being able to retrieve an old revision forever.

Keep signing keys trusted

The SDK verifies a script with public keys shipped in the SDK configuration. For a planned key rotation, release SDK configuration that trusts both the current and next public keys. Switch the server to the new private key only after customers have a version that trusts it. Keep the old public key during the transition, then remove it in a later SDK release.

Signatures prove who issued the text and whether it changed in transit. They do not make unsafe code safe, hide the text from customers or stop a customer from changing their own app. Never put passwords, private keys, payment decisions or server-only rules in a script.