heroiclabs / nakama-dart

Pure Dart Client for Nakama Server
https://heroiclabs.com/docs/nakama/client-libraries/dart
157 stars 48 forks source link

- update sessionRefresh function to accept string instead of session … #99

Closed garlen-javier closed 3 months ago

garlen-javier commented 3 months ago

Problem: client.sessionRefresh function only accepts session object which can't be save in a shared preference to be reused even if the app is restarted similar to the usage in unity example of fish game.

Fix: Update client.sessionRefresh to directly accept String instead of session object.

Also discussed here: https://forum.heroiclabs.com/t/restore-session-in-dart-using-authtoken-or-a-string-key/5139

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

garlen-javier commented 3 months ago

Thanks, you are right seems Unity has both Session.Restore and client.SessionRefreshAsync while Dart only got sessionRefresh. I'll see if I can submit a new pr for this.