EAS build for IOS failing to authenticate federated login

Am failing to build my app for IOS even though I am providing the correct AppleID and password.

Command: EXPO_DEBUG=1 EXPO_APP_STORE_DEBUG=1 expo build:ios -t archive

Managed workflow

  • Your eas-cli version
  Expo CLI 4.12.12 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
      Yarn: 1.22.17 - ~/.nvm/versions/node/v14.18.1/bin/yarn
      npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
    IDEs:
      Xcode: /undefined - /usr/bin/xcodebuild
    npmPackages:
      expo: ~42.0.1 => 42.0.4
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
      react-native-web: ~0.14.13 => 0.14.13
    npmGlobalPackages:
      expo-cli: 4.12.12
    Expo Workflow: managed

Error output:

⠋ Logging in...POST https://idmsa.apple.com/appleauth/auth/signin
⠦ Logging in...Error: Request failed with status code 403 (POST https://idmsa.apple.com/appleauth/auth/signin)
✖ Logging in...
Authentication with Apple Developer Portal failed!
Failed to set up Distribution Certificate
Failed to prepare all credentials.
The next time you build, we will automatically use the following configuration:
No credentials configured for app @imaware/imaware-portal-next with bundle identifier com.imaware.portal

Apple Service Error -22320. Federated Authentication is required
Error: Apple Service Error -22320. Federated Authentication is required
    at assertServiceErrors (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/node_modules/@expo/apple-utils/build/index.js:1:873662)
    at attemptLoginRequestAsync (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/node_modules/@expo/apple-utils/build/index.js:1:873227)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Object.loginWithUserCredentialsAsync (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/node_modules/@expo/apple-utils/build/index.js:1:871709)
    at loginWithUserCredentialsAsync (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/src/appleApi/authenticate.ts:133:22)
    at loginAsync (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/src/appleApi/authenticate.ts:92:12)
    at authenticateAsync (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/src/appleApi/authenticate.ts:152:23)
    at Context.ensureAppleCtx (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/src/credentials/context.ts:85:24)
    at generateDistCert (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/src/credentials/views/IosDistCert.ts:425:3)
    at CreateIosDist.provideOrGenerate (/Users/Elebioda/.nvm/versions/node/v14.18.1/lib/node_modules/expo-cli/src/credentials/views/IosDistCert.ts:52:12)```

can you share some information about your apple development team? it seems like your organization has ‘federated authentication’ enabled, i’m not personally familiar with this feature

also, you can work around needing to authenticate with apple at all by providing your own app signing credentials: Using existing credentials - Expo Documentation

I think using existing credentials will solve this problem. Thank you!