I am new to Firebase so any insights appreciated. I\'m writing Java server side test code. I grab several users from an database and am trying to migrate the data into user
If you are authenticating as different users because of security rules, using a server token is the better solution.
A Firebase connection can only have at most one user authenticated at any given time. However in the Firebase Java library there is an undocumented (and not officially supported) workaround to create multiple independent connections. In a class that is in the package com.firebase.client you can run the following code
// important this code needs to be in the package com.firebase.client
Config config1 = new Config();
Config config2 = new Config();
Firebase ref1 = new Firebase("https://.firebaseio.com", config1);
Firebase ref2 = new Firebase("https://.firebaseio.com", config2);
// ref1 and ref2 will now have independent connections, listeners and authentication states
Note that these will also open independent connections to the server.