Auto 2FA Launcher

Auto 2FA Launcher

Quick launcher for FFXIV with automatic Two-Factor Authentication

Utility 2FA Automation Quick Launch
XA

What This Script Does

Opens XIVLauncher

Launches configured XIVLauncher

Waits for Ready

Waits for launcher initialization

Generates OTP

Auto-generates 2FA code

Launches Game

Sends OTP and starts FFXIV

Prerequisites

Required Packages

pip install pyotp keyring requests

Install these Python packages to enable 2FA functionality.

Required Setup

  • Windows operating system
  • XIVLauncher with Dalamud installed
  • Square Enix account with 2FA enabled
  • OTP secret key stored in Windows Credential Manager

Complete 2FA Setup Guide

Important Notes Before Starting

  • • If your account already has 2FA enabled, you must disable it first and re-enable it
  • • Do NOT navigate away from the Mogstation during key registration
  • • Keep your emergency removal password secure
1

Disable Existing 2FA (If Applicable)

If your account already has 2FA enabled, log into your Square Enix account, navigate to One-Time Password settings, and remove/disable the existing authenticator.

2

Get Your Authentication Key

⚠️ Critical: Do not click the back button or navigate away during this process.

  1. Log into your account on the Mogstation website
  2. Navigate to: https://secure.square-enix.com/account/app/svc/otpTop
  3. Click on "Software Authenticator" option
  4. Click "Software Authenticator Registration"
  5. On the QR code page, click "Unable to Scan QR Code"
  6. Copy the Authentication Key and remove any spaces
  7. Add the key to your phone's authenticator app
  8. Enter the 2FA code on the Mogstation site
  9. Save your Emergency Removal Password securely
3

Configure XIVLauncher for 2FA

Enable the following settings in XIVLauncher:

  • "Log in automatically" (main launcher window)
  • "Use One-Time-Passwords" (main launcher window)
  • "Enable XL Authenticator app/OTP macro support" (settings → game tab)

First Login Note

The FIRST time you attempt to use the OTP macro support, you may get a Windows environment popup asking for permissions. Allow the permissions and try again if needed.

4

Store the OTP Secret in Windows

Use the provided Set_2FA_Key.py script to store your authentication key securely:

  1. Open Set_2FA_Key.py in a text editor
  2. Configure the keyring_name and secret_key values
  3. Run the script: python Set_2FA_Key.py
  4. Verify the key was stored in Windows Credential Manager
  5. Delete the secret_key from the script for security
5

Configure Launch_With_2FA.py

Configure the launcher script with your account settings:

# Account nickname to launch ACCOUNT_NICKNAME = "Main" # Launcher path for the account LAUNCHER_PATH = rf"C:\Users\{user}\AppData\Local\XIVLauncher\XIVLauncher.exe" # 2FA Configuration ENABLE_2FA = True KEYRING_NAME = "ffxiv_main_2fa" # Launcher Config Path LAUNCHER_CONFIG_PATH = rf"C:\Users\{user}\AppData\Roaming\XIVLauncher\launcherConfigV3.json" # Timing OTP_LAUNCH_DELAY = 10
6

Run the Launcher

Execute the script to launch FFXIV with automatic 2FA:

python Launch_With_2FA.py

The script will validate your configuration, launch XIVLauncher, wait for initialization, send the OTP code, and launch the game automatically.

Alternative Launchers for Alt Accounts

If you're using more than one account, alternative launchers help you avoid:

  • Having to manually change login credentials
  • Different plugin configurations for each account
  • Manually enabling/disabling plugins when switching accounts
  • Triggering plugin collections or managing conflicts

Setup Guide

For detailed instructions on creating alternative Dalamud launchers, please refer to our comprehensive guide:

Read How to Add a Launcher

Configuration Examples

Main Account

ACCOUNT_NICKNAME = "Main" LAUNCHER_PATH = rf"C:\Users\{user}\AppData\Local\XIVLauncher\XIVLauncher.exe" KEYRING_NAME = "ffxiv_main_2fa" LAUNCHER_CONFIG_PATH = rf"C:\Users\{user}\AppData\Roaming\XIVLauncher\launcherConfigV3.json"

Alt Account

ACCOUNT_NICKNAME = "Acc1" LAUNCHER_PATH = rf"C:\Users\{user}\AltData\Acc1.bat" KEYRING_NAME = "ffxiv_acc1_2fa" LAUNCHER_CONFIG_PATH = rf"C:\Users\{user}\AltData\Acc1\launcherConfigV3.json"