0x0ece / yopa-native

0 stars 2 forks source link

Expire clipboard copy after 1min #50

Open 0x0ece opened 6 years ago

0x0ece commented 6 years ago

To keep the world a safer place, we may want to clear the secret from the clipboard after, say, 1min. 1password does 45s, so we need to investigate if this is doable on android and ios.

This should be relatively easy, just with a js setTimeout, however we should test that it works for real on the device.

Also, we should make sure to keep the timeout handler, and revoke it if the user is doing another copy. The minute should restart at each copy.

In an ideal world, we can show the "copied" with a little indicator that show the time is expiring, but we can keep this 2nd part in a separated task.

0x0ece commented 6 years ago

It seems that expo will support background tasks very soon, probably already in v23: https://expo.canny.io/feature-requests/p/background-tasks-support