question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New IB Key advertisement breaks login

See original GitHub issue

I assume, I’m not the only one with this problem. It seems, IB added a new advertisement for accounts without 2FA, which advertises the IB Key app. It’s possible to skip this by pressing the “Continue” button. The advertisement pages appears immediatly after a successfull login and is shown at https://www.interactivebrokers.co.uk/sso/Dispatcher

This is what the pages lookes like: image

The continue button is enabled with a timeout after 2 seconds.

Based on the JavaScript of the site, it could be possible to set a cookie called SKIP_IBKEY_PROMO with value True to maybe bypass the whole screen. If this works, it would be easier to just set the cookie in the driver which should allow skipping implementing logic to handle the advertisement.

JS Source for cookie: image

Once the user presses “Continue”, he’s navigated normally to the account management pages. This should complete the login as normal.

Here is the HTML of the redirect login page: Login.html.txt

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
DanielHTpgcommented, Mar 10, 2022

@Voyz Just had a few mins to locally test some code to handle the advert and found a quick way. When the advert page is shown, the login actually already succeeded and the gateway is authenticated.

You can remove the cookie code and change authenticate.py trigger check as following

            # observe results - either success or 2FA request
            success_present = text_to_be_present_in_element([(By.TAG_NAME, 'pre'), (By.TAG_NAME, 'body')],
                                                            var.SUCCESS_EL_TEXT)
            two_factor_input_present = EC.visibility_of_element_located((By.ID, var.TWO_FA_EL_ID))
            error_displayed = EC.visibility_of_element_located((By.ID, var.ERROR_EL_ID))
            ibkey_promo_skip_displayed = EC.visibility_of_element_located((By.CSS_SELECTOR, 'a.ibkey-promo-skip'))

            trigger = WebDriverWait(driver, var.OAUTH_TIMEOUT).until(
                any_of(success_present, two_factor_input_present, error_displayed, ibkey_promo_skip_displayed))

The ibkey_promo_skip_displayed check is enough for ibeam to recognize it was a success and continue as authenciated.

Would appreciate if you could add this and update the docker image.

0reactions
JackD111commented, Mar 15, 2022

Closing this since #69 has been merged

Read more comments on GitHub >

github_iconTop Results From Across the Web

IBKR Mobile Authentication (IB Key) | IB Knowledge Base
A key component of protection is the Secure Login System (SLS), a login ... IBKR Mobile Authentication (IB Key) is available on your...
Read more >
Interactive brokers 2fa, IB key not working.
I putted on ib key and it doesnt work. Cant login with my tws, client portal, new app. Only can login with ibkr...
Read more >
Using IB Key
Using IB Key · Open IBKR Mobile on your phone. · Log into your account with your username/password credentials. · The IB Key...
Read more >
Latest News - Apple Developer
And now with new Today tab and product page ad placements, you can drive discovery of your app in more moments across the...
Read more >
SLS - | Alicjaworld.com
How to migrate the IB Key / IBKR Mobile authentication to a new ... Digital Security Card+ (DSC+) replacement if lost, broken or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found