Add the ability to convert an anonymous FirebaseAuth user to a permanent Google account using account linking APIs. Use linkWithCredential with a GoogleAuthProvider credential.
Link of reference: https://firebase.google.com/docs/auth/android/anonymous-auth#convert-an-anonymous-account-to-a-permanent-account