kryptco / krypton-android

DEPRECATED Krypton turns your Android device into a U2F Authenticator: strong, unphishable 2FA.
https://krypt.co
Other
203 stars 50 forks source link

push notification for U2F when phone is sleeping #108

Closed pjv closed 5 years ago

pjv commented 6 years ago

when my phone is asleep (screen off - not sure what the right terminology is for this state) and i am using the U2F auth via a web browser, i won't get the push notification unless i first turn the screen on.

I've taken a look at the notification permissions for the krypton app and compared it to the pushbullet app which does give me notifications when the screen is off. Inside the app notifications for pushbullet is a preference that says "Allow interruptions" (which i can toggle on or off). in app notifications for krypton there is no such option. Instead there are 4 categories (action required, action required silent, approved, approved silent).

i wonder whether it would be possible for krypton to receive push notifications with the screen off if you somehow specified the "allow interruptions" permission for its notifications (for me, I'd want that on the action required notification).

BTW: i liked krypton before (for devops SSH), but turning my phone into a U2F device is a game changer. Great work!

andykingking commented 5 years ago

I've noticed that I have a similar issue during SSH authorization/key requests after migrating from a phone with Android 6.0 to one with 8.1.

pryorda commented 5 years ago

I have this issue as well on Pie. I've even disabled battery optimization on the app.

pryorda commented 5 years ago

It looks like it works if you disable battery optimization on the app and restart. I'll continue testing and see if this does resolve it.

pjv commented 5 years ago

Doesn't work for me. I turned off battery optimization for the krpyton app, restarted the phone, and if the phone sleeps for a few minutes, then I get no krypton notifications unless / until I unlock the phone.

For a short time after the screen turns off, I do get the notifications. But after a few minutes of sleep I don't.

Again, i have other apps on my phone that will push notifications while it's sleeping (pushbullet for example), so I can only imagine there is something in how the notifications are being configured in the app that is possible to do differently so that the notification listener is active in the background even when the device is sleeping.

kcking commented 5 years ago

Have you updated kr to version 2.4.14? We addressed some android notification issues in the latest update to the command line kr tool.

pjv commented 5 years ago

I'm on 2.4.13 on my workstation which is installed via homebrew. That repo hasn’t been upgraded to 2.4.14 yet apparently.

In any case though, I'm talking specifically about notifications related to authorizing U2F logins via the chrome Krypton Authenticator extension (where I'm on v. 1.0.15).

pjv commented 5 years ago

Not sure what changed where, but as of this morning I now need to have the Krypton Android app open and active on my phone in order to receive any notifications to approve a U2F login. This is a showstopper for me and I'm going to need to replace Krypton as my U2F everywhere unless something good happens. I'm not an Android dev, and truth be told, I hate Java, but I'd dig in and try to figure out how to make notifications work better in the app if any of you kryptco guys will chime in here and indicate interest / willingness to engage on this issue.

edit: false alarm. Another app on my phone was going bonkers and interfering with push notifications. would still love to see the notifications work more reliably when the phone is sleeping. Given that i see that working with other apps, there must be a way to code the notifications so that whatever process is looking for them is exempted from sleep.

pjv commented 5 years ago

Closing as this has stopped being an issue for me. Notifications working as expected.