I had two step verification enabled on the account, and was using Google Authenticator as the authenticator to provide codes. I changed the phone and was trying the setup the authenticator but the login to bitbucket itself is requiring a code which I don't have. Fortunately the backup codes are working, using which I logged into the account and disabled 2FA. When I logout and login again it still asks me for the 2FA codes.
I also tried setting up 2FA again using the backup code as login and setup on the new phone's google authenticator, but the codes which is provided by the app on the new phone is not working on bitbucket.
Any idea on how to resolve this? I would eventually run out of backup codes to use like this and would be locked out.