Closed usamashafiqs closed 1 year ago
I'm not able to reproduce it with Dart SDK v0.9.1.
Future<void> authTest() async {
final pb = PocketBase("http://127.0.0.1:8090");
await pb
.collection('users')
.authWithPassword('test@example.com', '1234567890');
print(pb.authStore.token);
print(pb.authStore.isValid);
print(pb.authStore.model);
}
Make sure that the Future
doesn't throw an error (check Error handling).
Also keep in mind that the SDK store is currently not persistent (you can check https://github.com/pocketbase/dart-sdk/issues/13, pocketbase#1887).
If that's not the case, please provide a minimal reproducible repo and I'll try to investigate it.
authStore did not save token, model on device persistent storage.
Result
I try to manually save the token and model result are same.
Result