Authoritative server storage writes

Nakama’s storage engine currently only allows Owner Write and No Write permissions, which works fine in many cases, however for us, we have an authoritative server outside of Nakama who needs to write storage data on behalf of a connected player. For instance, updating character information like stats and equipment should be handled by the authoritative server and not the clients themselves. The clients are the ones who make the initial request to create the character though, as at that point, the client isn’t connected to an authoritative server.

I don’t see a clear path to implement this. Any ideas?

One thing I thought of that might work is to have a separate authoritative user that only RPCs have access to and is maintained in a background goroutine on the server. This seems overly complicated and prone to error, however, so I was wondering if there were a simpler approach here.

Scratch that. I had forgotten that you don’t need to specify a user id when creating an object and if no user id is provided, it will be system owned, which is exactly what I want. Sorry!

1 Like