twofas/2fas-ios

Notifications from the extension only work reliably when the app isn't open

Opened this issue · 15 comments

Not sure if you'd consider this an app or an extension issue...

I'm using app version 5.2.6 and extension version 1.6.2 (running in Chrome Version 121.0.6167.184).

When I launch the (paired) extension to contact my phone for a code, the notification is nearly always received and displayed if the app isn't running or in the foreground. However, if the app is already "up" on my phone and displayed, I seldom get a notification from the extension - the "Notification" section in the app is also empty when this happens. If I close the app and re-click from the extension. then I get the notification and everything works as it should...

Same here. No push notifications safari extension and iOS 17.4 latest beta.

This is oddly variable for me, although not in a good way ;) . I'd say that around 95% of the time I don't receive notifications from the app, via the extension, if the app is already open on my phone. However, around 5% of the time I do.

Should have mentioned I'm running iOS 17.3.1.

Just upgraded to iOS 17.4 - behaviour seems to be the same.

I've tried to get into the habit of closing the app after approving each notification from the extension, it then mostly works for the next notification approval (although not always). If I forget though, and leave the app open, it's still around 95% of the time that I don't get a notification that I can approve in the app.

I second this issue. I haven’t done any closer investigation on it, but for me I almost never receive a push if the app is already open. The safest way for me to know that I’ll receive the push is to lock my screen.
iOS 17.4

Hi, we're investigating it.

I'm using the app (v5.3.5) on iOS 16.6.1, extension 1.6.4 on Edge 122.0.2365.92, and I've had a similar issue. I've enabled the browser extension for the first time, and there were no notifications while the app was open or in the background. Then I force-closed it and clicked the extension once more. Still nothing happened. Then I opened the app manually and I think it automatically offered me to select a service, twice in a row.

Then I logged out of service and tried for it again, it worked both with closed and running in background. When in foreground, it did open the prompt, but there was no push sound or notification left. I tried the same with a new service, still was not able to clearly reproduce the first issue.

Hi, we've run a battery of tests and we couldn't find anything wrong. To summarise the behaviour is as follows:

  • if the app isn't running and device receives push, then it's visible on the notifications screen. User can tap it to open the app or long press to use the notification extension
  • if user taps it, then the app will run. Upon every start of the app it checks with the backend (if BE is registered) is there are any awaiting authorisations to be handled
  • those authorisations have a time to live. If I remember correctly it's ~ 5 minutes (could be less. 3?). So there could be a situation where there's is a notification on the locked screen, but the app won't ask for authorisation, because all requests have timed out
  • if the app is running, upon entering the Tokens tab, the app will pull a list of awaiting authorisations from backend
  • if the app is running on the Tokens tap and it received the push notification, it will make the pull on its own and show the authorisation (list or question) screen. There'll be no visible push (sound, Push Notification at the top of the screen), as the app "consumes" it and triggers the pull.
  • Push Notifications don't always come immediately. There could be (is) a significant delay. That's why sometimes going into the Tokens tab will trigger fetch quicker than the push.

We monitoring the BE and we'll continue to do so, but for now we can't detect anything wrong with it. If this will persist I will ask you to join our discord and I will send you in private a request for apps logs. From that we can learn more.

So, I've installed the latest version of the app, 5.3.5, and I'm now using extension 1.6.4 with Chrome 123.0.6312.86 (on Linux) and now iOS 17.4.1.

Here's what repeats the behaviour for me nearly every time (with an interesting twist, that I've just discovered, at the end 😄 ):

  1. My phone is locked, and 2FAS isn't running
  2. I trigger the extension in Chrome
  3. I receive a notification on my lock screen which I tap
  4. My phone unlocks, 2FAS starts and provides me with the "Approve" dialogue - I accept it, the code is filled in Chrome, all is good ✔️
  5. I don't interact with my phone again, and it locks itself
  6. I trigger the extension in Chrome
  7. I receive a notification on my lock screen which I tap
  8. 2FAS opens but doesn't give me an "Approve" dialogue ❎
  9. I wait a bit - nothing happens
  10. In 2FAS I tap on "Settings", then back to "Tokens", then the "Approve" dialogue appears...

Just as a follow up on my last comment: I've been using step 10 as a workaround for the last two weeks - it works 99% of the time.

The issue, at least, for me, is that the "Approve" dialogue needs to be coaxed into making an appearance in the app, and tapping between "Settings" and "Tokens" seems to do that.

@cotman yes, it triggers fetching list of awaiting authorisations from server. I'll check the steps you've provided. Thanks!

I'm seeing the same behavior as @cotman and I use the same solution: click on Settings and then Tokens. This causes the approval dialogue to appear.

Is this still an issue with newest release?

It hasn't been fixed for me - I'm running 5.3.9 and still see the same behaviour as originally reported.

cotman commented

As a chaser to my response above - I've now been using the new version of the app for some time (i.e. 5.3.9) on iOS 17.6.1, and I don't see any change in behaviour from the original bug report - I'm still using the same workaround of tapping "Settings" then "Tokens" to get notifications to appear when the app is already running.