Replies: 14 comments 9 replies
-
|
All "mobile authenticators" are essentially the same tech, technically called TOTP or Time-based One Time Password. The reason I recommended 2FAS over other solutions is the easiness of exporting the private key. But if you can extract that private key from other solutions, which takes a bit of work, you can use it the same way as documented, via |
Beta Was this translation helpful? Give feedback.
-
|
I make it almost work. You are correct. I managed to export the key from Google Authenticator to 2FAS. Both devices show the same code at the same time after my exporting. There is a new issue. Probably, this is related with account setup. I have a few usernames for my IBKR account. 1) one user name uses the old physical card tokens; 2) one user name does not require 2FA at all (a magic). this account actually works with your docker; but IB Gateway displays a window asking me to enable 2FA; 3) most recently, i applied for a new account, to be used for this IB gateway. This is the account i am working on now. For the new account, I have to apply for IBKEY first, and then enable Mobile Authenticator (Google Authenticator). So login for this account is slightly different from yours. The login window will appear as follows: Can you help to resolve this flow? If you want to test, you might need to apply for a new username. |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I don't have an account to replicate your setup. But I've seen that choice window before so let me try to handle that choice. Hopefully I can get an update out soon. What's weird is that I previous had IB Key and a physical device. But ever since IB allows me to link a new mobile authenticator, those options disappeared from my login process. Both TWS and IBG prompts mobile authenticator without a choice now. Only the customer portal behaves differently. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I've just pushed out a version (docker hub image) that should theoretically select "Mobile Authenticator app" upon seeing that "Second Factor Authentication" prompt. Can you give it a try and let me know if it works? |
Beta Was this translation helpful? Give feedback.
-
|
Sorry. this still does not work. It seems the choice for second factor device window passed, but it hangs on the authentication code window The terminal looks like this: |
Beta Was this translation helpful? Give feedback.
-
|
shiming, really appreciate your efforts on this work. It is a great endeavor. Previously, I have to consider buying a Windows VPS to just host this IBGateway. IBKR really suckx. no idea why they host such a GUI application as the communication hub (slow performance). With your approach, at least we can host everything in the Linux console. Understand it is a bit annoying for you to try without a proper user account, but my account is loaded with money :( it is a bit sensitive to lend out my account. Log into the IBKR Client portal ==> Settings ==> Users & Access Rights ==> you can apply for new log in IDs. For example, I have many id in my account: For future accounts, I believe they will go through the same flow as my newly applied account. I mentioned above: 1) my first ID still uses the tokens table; 2) my second ID does not go through the 2FA at all (a magic). These 2 user IDs are really special accounts. All the other IDs have to go through the 2FA. |
Beta Was this translation helpful? Give feedback.
-
|
So I have a spare account, that previously had two options for 2nd factor: IB Key, and a physical device. Today I used the QR code in its control panel to link the Mobile Authenticator app. After that, I noticed the physical device was removed from 2nd factor list. Then I tried logging in with IBG. The first time, it pops up IB Key directly, but I saw a link to select another way. I clicked on it, and I see the selection box with IB Key and Mobile Authenticator app. I noticed the latest version (heshiming/ibga:latest) will proceed to select the proper one. And then TOTP will kick in and automatically fill. In other words, it's working for me. But this is just the first time. I noticed from the second time onwards, it no longer lets me choose a way, and default to TOTP every time. So I guess once you selected this option, it'll be kept and you no longer have to worry about it. Configuration should be like this, (under environment of docker-compose.yml):
I can't think of another reason it would fail. You might want to check whether your container image is really the latest one. Even if you pulled the latest image, you have to recreate the container so that it's not using the older one. I just tried pushing heshiming/ibga image again, even though dockerhub says the image was just updated now, all layers are not changed. So I'm pretty sure the latest version works |
Beta Was this translation helpful? Give feedback.
-
|
My issue is: the starting up gets stuck on the 2FA window (OTP Window). The log on is supposed to fill in the 6 digit code generated from the secret, but it does not fill in any code. At this step, if I manually fill in the OTP codes, the log on can still continue. My question is: your docker image should already contain the oathtool package. correct? I even tried to install oathtool on my host machine (Oracle 9 Linux). After installation, the log on still get stuck on the OTP window. [root@oc-docker cking]# oathtool --totp -b "MMP4SFIZYBGZZZZZZZZZZZZZZZZZZZZ4" My docker-compose.yml is as follows: |
Beta Was this translation helpful? Give feedback.
-
|
I think I found the cause. The window class of that TOTP dialog changed during development, and my handling of previous versions had a typo. Details are here: a1cb50a So if you could try pull the image again, and recreate your container, you should be good to go. I suspect that during this period, you have never tried to reinstall IBG (by deleting ./run/program). Somehow that new version is released just couple days ago. If that didn't work, you could still help debugging. The procedure is as follows:
This will let me know the window-class of the TOTP dialog. Perhaps TOTP dialog is region-specific. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah. Indeed i tried to delete the run folder. BTW, my host VPS is located in Tokyo. [root@oc-docker cking]# docker exec -ti cking-my-ibga-1 bash |
Beta Was this translation helpful? Give feedback.
-
|
I can see you are running the latest Build 10.36.1c. I tested it out and it worked fine for me. However, from your UI component dump, I don't see a TOTP window, which is probably why no TOTP automation can be performed. I'm not sure how to go from here. The text file you pasted shows all the titles of the windows and buttons. But there's nothing about Mobile Authenticator or Second Factor. I've got two individual accounts of the China region, and two institutional account from the U.S. region. None of them behaves this way. |
Beta Was this translation helpful? Give feedback.
-
|
What do you mean by the TOTP window? this widow? |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I'm referring to the one in your screenshot. Did you keep it open while typing those commands according to my instructions? |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Shiming, good news! I just launched a VPS (Rocky Linux) instance in HK on Microsoft Azure. It works perfectly :) |
Beta Was this translation helpful? Give feedback.







Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for you great work!!!
Da*n IBKR. I have been fighting with them to support the third party authentication tool 2FAS . They refused.
They say, Google Authenticator is supported. I searched: we can extract out the key for Google Authenticator. Is it okay to support Google Authenticator.
FYI, you can apply for more IBKR usernames.
Beta Was this translation helpful? Give feedback.
All reactions