Can't login to Apple with 2FA enabled

I am trying to add a device to my apple account and I cannot login via the CLI because I have 2FA enabled on my account. I get the phone call from Apple but when I enter the code it says invalid. I have tried 5+ times and when I logged into the Apple Developer Website, I got the call and was able to login first time. I’m on EAS CLI 5.3.0 on Mac OS Sonoma.

Ended up deleting and re adding my phone number and it worked.