eas credentials is failing to authenticate to Apple Developer

When creating credentials for my project, eas credentials is failing with the following error:

:heavy_check_mark: Logged in New session
› Team $TEAM_NAME ($TEAM_ID)
Authentication with Apple Developer Portal failed!
Failed to set up credentials.
AssertionError [ERR_ASSERTION]: An unexpected error occurred while completing authentication
An unexpected error occurred while completing authentication
Error: credentials command failed.
at Credentials.catch (/usr/local/lib/node_modules/eas-cli/build/commandUtils/EasCommand.js:83:15)
at Credentials._run (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js:84:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Config.runCommand (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js:272:25)
at async Object.run (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/main.js:74:5)

I am using this eas-cli version: eas-cli/3.12.0 darwin-x64 node-v19.7.0

Here is my env:

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.3.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 19.7.0 - /usr/local/bin/node
npm: 9.5.0 - /usr/local/bin/npm
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
npmPackages:
@expo/webpack-config: ^0.17.4 => 0.17.4
expo: ^46.0.21 => 46.0.21
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.71.3 => 0.71.3
react-native-web: ~0.18.11 => 0.18.12
react-navigation: ^4.4.4 => 4.4.4
npmGlobalPackages:
eas-cli: 3.12.0
expo-cli: 6.3.2
Expo Workflow: managed