How can I refresh the cache after a user changes their username?

Because Nakama caches the username and doesn’t update the cache when you change it (is this a bug?) I wanted to call SessionRefreshAsync() to fix the cache, but when I do this call, I keep getting an API Response Exception: “Refresh Token is required”. What could I be doing wrong?

Also, as this function isn’t documented yet (?) should your store this refreshed token after the call, I guess you need to do that as JWT includes the expire time?


Hey @nixarn :wave: could you share how you’re calling SessionRefreshAsync?

Nakama doesn’t manage your cache for you because there are lots of different ways of caching your data. So yeah you’ll need to store the refresh token and pass it to SessionRefreshAsync when you are obtaining a new auth token.