I read the Convert an anonymous account to a permanent account and see that using the:
auth.currentUser.linkWithCredential(credential)
will