Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I save the anonymous firebase credential to another place than localstorage?

I am creating a app with cordova, ionic3 and firebase. The app does not require to sign in, since the user will be automatically signed in as an anonymous firebase user. The problem is that firebase saves the anonymous user credential in the localstorage. And in the cordova world, this means that it is not 100% reliable.

In the documentation it says:

iOS stores localStorage data in a location that may be cleaned out by the OS when space is required.

This means the data might get lost since I am only using the anonymous login from firebase. I know that I can link the accounts together, but in my case I do not want to do this.

My question is; Can you store the firebase anonymous auth token somewhere else so it can be 100% reliable for IOS users?

like image 943
Christian Avatar asked Oct 30 '22 06:10

Christian


1 Answers

I have contacted Firebase staff and they say that this is not possible at the moment. However, this could change in the future. They have plans of open-sourcing their SDKs in the near future, which would make it possible to change this behaviour.

Here is also a response from one of their engineers

like image 96
Christian Avatar answered Nov 14 '22 02:11

Christian