Created
May 27, 2026 19:21
-
-
Save outadoc/3964679f51f217a4bba726da8bfc3364 to your computer and use it in GitHub Desktop.
Automatically read your Square Enix OTP from 1Password using XIVLauncher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Automatically read your Square Enix OTP from 1Password using XIVLauncher | |
| 1. Install and setup XIVLauncher | |
| Note: Flatpak version doesn't seem to work here | |
| 2. Enable the "Enable XL Authenticator app/OTP macro support" option in XIVLauncher settings | |
| 3. Install and configure the 1Password CLI. Make sure it's working. | |
| 4. Create a new script: create the attached shell file as `~/.local/bin/xivlauncherotpd.sh` | |
| 5. Create a new systemd unit: create the attached service file as `~/.config/systemd/user/xiv-launcher-otp.service` | |
| 6. Run `systemctl enable --user xiv-launcher-otp` to enable the service | |
| The next time you start FFXIV and asks for your OTP, a 1Password prompt should show up. Unlock your vault if necessary and confirm; there you go, you're logged in! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=FFXIV OTP auto-sender | |
| After=network.target | |
| [Service] | |
| ExecStart=/home/<username>/.local/bin/xivlauncherotpd.sh | |
| Restart=on-failure | |
| [Install] | |
| WantedBy=default.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -xe | |
| while true; do | |
| if ss -tlnH sport = :4646 | grep -q .; then | |
| echo "Launcher is waiting for OTP" | |
| # Get this reference by clicking "Copy secret reference" on your OTP field in 1Password | |
| otp=$(op read "op://xxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxx/TOTP_xxxxxxxxxxxxxxxxxxxxxxxxxx?attribute=otp") | |
| echo "Sending OTP: $otp" | |
| curl "http://localhost:4646/ffxivlauncher/$otp" | |
| fi | |
| sleep 5 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment