I transferred an app to a new developer account. When I upload a build from the new developer account and deploy it through Testflight, I encounter that my users logged out from the app.
I think this is due to the Keychain Loss, because the Team ID
changed. So, I contacted Apple, and they said that there is no way to have access to the old Keychain in the new developer account, but that I could transfer the app back to my old developer account.
This is really bad for us, since we have user-created data in the device that gets lost on logout. We also have anonymous users, and they can’t even regain access to their accounts because there are no credentials to login. This is not acceptable to us because we would be losing user data, but we also need to transfer the app to the new developer account... So we are trying to find possible solutions.
Possible Solution #1
Far from ideal: keep using the old developer account for a month, for example, and show an alert saying something like:
Please save/backup all your data and signup (if you have an anonymous account) because all unsaved data will be lost on the [todays date + 1 month] due to a migration. Sorry for the inconvenience.
After a month, we transfer again to the new developer account. Users that didn’t see the message in that month or didn’t save data, bye bye data… terrible.
Possible Solution #2
I'm not sure if Firebase Auth iOS SDK has the APIs to do something like this:
- Transfer the app back again to the old developer account
- Upload a new build from there that saves the Firebase Authentication State (e.g. the token) temporarily in a file (I know it's insecure... maybe I could encrypt it)
- Transfer the app back again to the new developer account
- Upload a new build that checks if that file exists, and copies the Auth State into the Firebase Auth SDK again. This way the user is still logged in as if nothing happened.
This second solution is kind of insecure, complicated and difficult to test, but from the user point of view, it would be more ideal than the first solution (if everything goes well).
So, specifically my questions are:
- Would solution #2 be possible with Firebase Auth?
- Does anyone have more ideas on how to approach this? I guess that transferring apps (with login) is a common use case!
We currently only use Anonymous & Email/Password authentication methods.
Thanks!