nhost/nhost-dart

persistent Auth Example broken

chief-nerd opened this issue · 1 comments

Flutter auth SDK seems to be broken

My Code (with go_router)
https://gist.github.com/chief-nerd/c5dc85a40c9f72040e7a4b6875189606
which is pretty much the code from
https://github.com/nhost/nhost-dart/blob/main/packages/nhost_flutter_auth/example/lib/persistent_auth_example.dart

I see on Web in my Chrome Application that the token is being put into store.
But when I do a reload of the application I am logged out again.

Do I need to call nhostClient.auth.signInWithStoredCredentials(); manually? Cause it's not called during init of the application??

Hi,
Yes, There is an example here #91

I am, at the moment, creating a better way to handle this out of the box in the library; it'll come out as soon as we have a stable release. More examples are also on the way.