Temporary Accounts

Each time someone connects to my server, a new account is made. This is flooding my database with accounts that are only used once.
Given that my game doesn’t use an actual account system, is there a way to make these accounts one-time, or automatically delete?

@11clock This is an unusual use case that Nakama’s accounts system isn’t directly intended for. Nakama aims to enable engaging social experiences, and part of that is a consistent identity, friends list, group/clan/guild membership, chat history, and more.

Your best bet is probably to run a query against the database every day or so that deletes accounts created more than one day ago. This would effectively keep a rolling 1-day window of accounts in the database, and if the same user comes back again they would be given a new account with a new ID.

I am actually trying to do the exact same thing as OP. My game is intended for mostly temporary authorization but of course this will end up with a flooded database - similar case goes for chat messages that are persisted (and cannot be viewed without knowing the name ahead of time)

Could you describe how I could go about making this query? would this be a nakama module? If possible I think I could also utilize this method to scan chat messages that are older than a certain date (and proceed to delete them) - if its not too much, could you also describe how this could be done without knowing chat names?

Thank you all for the amazing work you’ve done!

edit: apologies I just realized how old this post is, not sure if I should’ve made a new one…