Question: My appleid has two factor authentication turned on. For continuous integration we use Fastlane tool.

```
Available session is not valid any more. Continuing with normal login.
Two-factor Authentication (6 digits code) is enabled for account 'my.account@gmail.com'

```

What can I do to fix that?

Answer: 
1. On yout machine when CI is running, go to the terminal and type the following command:

```
fastlane spaceauth -u my.account@gmail.com

```
2. Then fastlane will ask you about the code: `Please enter 6 digits code:`. Get it from another trusted device and type it here.
3. You will receive **FASTLANE\_SESSION** key. Just copy and paste it.
4. Login to your gitlab account that is used along with your CI and go to `Settings > CI/CD > Variables`. Then define `FASTLANE_SESSION` variable, type the value and save.
5. Run your job again.
from fastlane 2.173.0 - just use SPACESHIP\_SKIP\_2FA\_UPGRADE=1 <https://github.com/fastlane/fastlane/releases/tag/2.173.0>