Skip to content

Account integration

AI Summary

A short gist of this page, generated for you.

Powered by AI. Summaries can miss nuance — when in doubt, read the page.

Funox player accounts are optional. Use them when your game benefits from progress that follows the player.

#When to use accounts

Use them if your game has any of:

  • Progress that should follow the player to another device
  • A player name or avatar shown in the game
  • Inventory or unlocks tied to a player

Skip them if your game is a quick single-session experience with nothing to keep.

#How it works

Players log in on Funox itself, not inside your game. Your game only reads who is playing:

  • getUser() returns the player, or null for a guest.
  • The userChanged event tells you when the player logs in or out while the game is open.
  • saveProgress() stores progress on the logged-in player's account.

There is nothing to configure and no sign-in screen for you to build.

#Guests

  • Guests must be able to play the whole game. Never block gameplay or rewards behind a login.
  • Guests cannot save to the cloud: saveProgress() rejects with NOT_AUTHENTICATED and loadProgress() returns null. Keep a local copy for them — see Save data → Guests.
  • When a guest logs in, offer to carry their local progress over.

#Showing the player

  • Show the player's name and avatar when they are logged in, so the connection is visible.
  • Handle the null case everywhere — most new players are guests.

#Privacy

  • Use only the player data the SDK provides.
  • Do not ask for a player's email, real name or other personal information through your own forms.
  • If you store content created by players, make it possible for them to have it deleted on request.