How to get twofactor notifications on android app?

Server: debian 8, apache 2.4.10, PHP 7.3, NC17RC1 and earlier (release) versions, twofactor_nextcloud_notification 2.1.1; Mobile phone: Android 9, NC App 3.8

I can* log in with twofactor_nextcloud_notification if I open the NC app and navigate to Notifications and click there. However, what I expect is an ANDROID push notification (even if the NC app is closed), and that I can confirm my login in the android system notification area, not IN the app ONLY. Does that work for others? What might I be missing?

Hi @nursoda,

are you using the f-droid (no push notifications) or the Google Play version of the app?

According to App-Info / App-Details: “App was installed from Google Play Store”, Version 3.8.0. All notifications are set to on, “Don’t optimize power”, background activity not restricted. I’m on OnePlus 6T, official OOS 9.0.16 is Android 9, Patchlevel August 1st.

I have multiple NC accounts set up in the app if that’s relevant. To make sure it’s not, I open the files* dialog of my business account. Even if I have the app open on-screen, I don’t get the login 2FA request when I try to log in to that account in the browser on my PC.

*) I tried to avoid having “Notifications” dialog open right away, in case Android notifications would be suppressed then.

When I switch to Notifications, they are “waiting” there, so I can use the app to log in, but the whole idea is not to be forced to open the app, select the account, switch to notifications and only then to be able to accept the login request, is it? :wink:

I moved to a new server and set up a test NC. I noticed that with a new user account on the test NC, I get notifications through Google push service / Android framework as expected, even when NC app is closed and phone is locked.

So I moved on to test on the old NC that I migrated. For a new user, it also works there. But I can’t get it to work for my existing user although I do the exact same steps:

  • disable all 2FA for that account
  • enable just 2FA through NC App Notification
  • set up an AppPIN
  • install latest Android NC App
  • scan QR (or manually enter credentials invl. AppPIN, no difference) to connect account
  • close NC app (doesn’t matter really)
  • logout from web, log back in, “Confirm on NC app” is displayed
  • NO NOTIFICATION on Android, only in-App when I navigate there (I can click Yes there: then the web login completes)

Bottomline: HOW TO DEBUG this (in SQL)?

Shall I move this to a bug report on github?

Hi nursoda, I have a very similar issue to you.I was trying to send 2fa auth to device with no joy. No notifications coming through in the android app , version 3.8.1 (play store version) my app says “local file does not exist” push not available. See attached photo. I have tested this on a separate device under a different user with the same outcome. Did you get a solution to your issue?

Ignore the previous message folks :slight_smile: I had the notifications app disabled on the server . all working good now. :slight_smile:

Well, I do still have the issue. It’s not present at first, but notifications don’t arrive later (like one or two days later). Could be over-optimization of the mobile device OS? (Running latest official OOS on OnePlus 6T)

However, it’s not only my device: I have reports from several users with completely (and partly much older = less optimized) devices. Same there: What worked when tested after setup did not work a couple of days later any more. Frustrating, if it’s the only means of 2FA.

(Yeah, I know that having backup codes is a good idea, but to get users to use 2FA at all is hard, if it’s not working reliably, it’s TOO hard.) It lead me to disable 2FA-App-Push on all clouds for now. I’m open to test if I have a concept how to test systematically. Any hints welcome.

Anyway, the iOS cannot use push notifications? One cannot enable it “just for users that have a workable device”? There is no setup warning that the iOS cannot use this. That was my second reason to disable it.

@nursoda yes for something like 2fa I agree you need to have it deliving the notifications pretty quick and reliably . hope you find a solution to your problem.

I can personally recommend the Two-Factor TOTP Provider app, the Two-Factor Gateway app with Telegram, and the Two-Factor U2F apps.