jonsaw / amazon-cognito-identity-dart

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
204 stars 93 forks source link

Logged in user does not persist in storeage #45

Closed CtrlAltDft closed 4 years ago

CtrlAltDft commented 5 years ago

Whenever i log in an user with authenticateUser(), I can get the user's info by calling getCurrentUser() as long as the app is still running. However, when the app is relaunched, getCurrentUser() will always return null and thus user will have to login again

johanlantz commented 5 years ago

Do you provide a storage to the CognitoUserPool? There is a good example on how to do that here: https://pub.dev/packages/amazon_cognito_identity_dart

under use custom storage.

By default things are just persisted in memory.