How to clear firebase cache?

前端 未结 2 406
一个人的身影
一个人的身影 2021-01-06 07:50

I\'m facing an issue where when I sign out a user (using FirebaseAuth.signOut() method) and sign in with another user, information of the previous user are load

相关标签:
2条回答
  • 2021-01-06 08:14

    You can use the async call FirebaseFirestore.instance.clearPersistence(); for flutter projects. Check this answer.

    0 讨论(0)
  • 2021-01-06 08:23

    For Android, there is FirebaseFirestore.clearPersistence().

    For JavaScript/web, there is Firebase.clearPersistence().

    For iOS, there is Firebase.clearPersistence().

    Flutter does not seem to have this API yet.

    Bear in mind that the clearPersistence API is not meant for the specific case you're talking about. If you read the API docs carefully, you can see they're meant for testing.

    You might want to do a little more debugging to figure out what exactly it is that's not working the way you expect. Since you're not showing any code, it's hard to tell if you might be doing something wrong.

    0 讨论(0)
提交回复
热议问题