I'm working on a project where users should be able to use an app without any login. But they should also be able to login with their google account to sync their data with multiple devices.
How can I get a unique identifier for "anonymous" users? I know there exists a method such as .push().getKey()
to get an uid from the realtime database, but where can I store this key on the device?
I'm also working with firebase authentication, so when people are using their google account for the app, I can use the Uid from firebase authentication. There is also an option for anonymous users in firebase authentication, but I dont want to go with that, because this would store the data only temporarily.