Skip to content

Commit

Permalink
Revert "Require an unlocked device for NFC (#40)"
Browse files Browse the repository at this point in the history
This reverts commit fbfd49a.
  • Loading branch information
fmeum authored Jan 3, 2025
1 parent fbfd49a commit decc8e3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import me.henneke.wearauthn.fido.context.AuthenticatorSpecialStatus.USER_NOT_AUT
import me.henneke.wearauthn.fido.context.RequestInfo
import me.henneke.wearauthn.fido.ctap2.Authenticator
import me.henneke.wearauthn.ui.isDoNotDisturbEnabled
import me.henneke.wearauthn.ui.keyguardManager
import me.henneke.wearauthn.ui.showToast
import me.henneke.wearauthn.ui.vibrator
import me.henneke.wearauthn.v
Expand Down Expand Up @@ -76,12 +75,6 @@ class NfcAuthenticatorService : HostApduService(), CoroutineScope {
}

override fun processCommandApdu(commandApdu: ByteArray, extras: Bundle?): ByteArray? {
// Always allow usage on devices without a secure screen lock.
if (keyguardManager?.isDeviceLocked == true) {
notifyUnhandled()
showToast(getString(R.string.unlock_to_use_nfc))
return null
}
v { "<- ${Hex.bytesToStringUppercase(commandApdu)}" }
val rawCommandApdu = commandApdu.asUByteArray()
if (SELECT_FIDO_APDUS.any { rawCommandApdu.contentEquals(it) }) {
Expand Down
1 change: 0 additions & 1 deletion authenticator/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,5 @@
<string name="preference_log_level_dialog_title">Log-Level wählen</string>
<string name="preference_log_level_dialog_message">Auf \"Debug\" oder \"Verbose\" können Logs persönliche Informationen enthalten.</string>
<string name="status_bluetooth_permissions_required">Bluetooth-Berechtigung nicht erteilt</string>
<string name="unlock_to_use_nfc">Für WearAuthn entsperren</string>
</resources>

1 change: 0 additions & 1 deletion authenticator/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@
<string name="preference_log_level_dialog_title">Choose a log level</string>
<string name="preference_log_level_dialog_message">Logs may contain personal information on \"Debug\" or \"Verbose\".</string>
<string name="status_bluetooth_permissions_required">Bluetooth permission not granted</string>
<string name="unlock_to_use_nfc">Unlock to use WearAuthn</string>
</resources>
2 changes: 1 addition & 1 deletion companion/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="changelog"><![CDATA[<h4>Letzte Änderungen</h4><b>Unveröffentlicht</b><br/>• NFC-Funktionalität setzt jetzt ein entsperrtes Gerät voraus<br/><br/><b>Version 0.9.19</b><br/>• Anpassungen für aktuelle Android-Versionen<br/>• Absturz beim Zurücksetzen behoben<br/>• Absturz durch spezielle Bluetooth-Geräte behoben<br/><br/><b>Version 0.9.17</b><br/>• Initialer CTAP 2.1-Support<br/>• Passwortabfrage erfolgt nun vor dem Bestätigungsdialog<br/>• HMAC-Erweiterung berücksichtigt nun das Ergebnis der Nutzerverifikation<br/><br/><b>Version 0.9.16</b><br/>• Zuverlässigkeit der Bluetooth-Verbindung und Zifferblatt-Verknüpfung verbessert<br/>• Kleinere Verbesserungen an der Übersetzung<br/><br/><b>Version 0.9.15</b><br/>• Aktualisierung der Abhängigkeiten aufgrund von Inkompatibilitäten<br/>• Anpassung einer Übersetzung, die einen Button verdeckte<br/><br/><b>Version 0.9.14</b><br/>• Deutsche Übersetzung<br/>• Verbesserte Texte und Datenschutzrichtlinien<br/>• Fehlender Email-Text bei \"Problem melden\" ergänzt<br/><br/><b>Version 0.9.13</b><br/>• Compatibility with Microsoft AAD<br/>• Compliance with CTAP 2.1<br/><br/><b>Version 0.9.12</b><br/>• Bugfixes related to attestation<br/>• Fixed a crash when user verification times out over NFC<br/>• Fixed display of creation dates of stored credentials<br/><br/><b>Version 0.9.11</b><br/>• Bugfix for watches on Android P+<br/><br/><b>Version 0.9.10</b><br/>• Manage your single-factor credentials on the watch<br/><br/><b>Version 0.9.9</b><br/>• Improved interoperability with Windows 10<br/>• Added RP ID to resident key metadata<br/><br/><b>Version 0.9.8</b><br/>• Improved the UI for resets and errors<br/><br/><b>Version 0.9.7</b><br/>• UI improvements in the phone app<br/><br/><b>Version 0.9.6</b><br/>• Fixed a missing toast after a single CTAP2 assertion via NFC<br/><br/><b>Version 0.9.5</b><br/>• Added support for transaction confirmation via the "txAuthSimple" extension<br/><br/><b>Version 0.9.4</b><br/>• Added support for offline login via the "hmac-secret" extension<br/>• Fixed a crash when extensions were requested with an assertion]]></string>
<string name="changelog"><![CDATA[<h4>Letzte Änderungen</h4><b>Version 0.9.19</b><br/>• Anpassungen für aktuelle Android-Versionen<br/>• Absturz beim Zurücksetzen behoben<br/>• Absturz durch spezielle Bluetooth-Geräte behoben<br/><br/><b>Version 0.9.17</b><br/>• Initialer CTAP 2.1-Support<br/>• Passwortabfrage erfolgt nun vor dem Bestätigungsdialog<br/>• HMAC-Erweiterung berücksichtigt nun das Ergebnis der Nutzerverifikation<br/><br/><b>Version 0.9.16</b><br/>• Zuverlässigkeit der Bluetooth-Verbindung und Zifferblatt-Verknüpfung verbessert<br/>• Kleinere Verbesserungen an der Übersetzung<br/><br/><b>Version 0.9.15</b><br/>• Aktualisierung der Abhängigkeiten aufgrund von Inkompatibilitäten<br/>• Anpassung einer Übersetzung, die einen Button verdeckte<br/><br/><b>Version 0.9.14</b><br/>• Deutsche Übersetzung<br/>• Verbesserte Texte und Datenschutzrichtlinien<br/>• Fehlender Email-Text bei \"Problem melden\" ergänzt<br/><br/><b>Version 0.9.13</b><br/>• Compatibility with Microsoft AAD<br/>• Compliance with CTAP 2.1<br/><br/><b>Version 0.9.12</b><br/>• Bugfixes related to attestation<br/>• Fixed a crash when user verification times out over NFC<br/>• Fixed display of creation dates of stored credentials<br/><br/><b>Version 0.9.11</b><br/>• Bugfix for watches on Android P+<br/><br/><b>Version 0.9.10</b><br/>• Manage your single-factor credentials on the watch<br/><br/><b>Version 0.9.9</b><br/>• Improved interoperability with Windows 10<br/>• Added RP ID to resident key metadata<br/><br/><b>Version 0.9.8</b><br/>• Improved the UI for resets and errors<br/><br/><b>Version 0.9.7</b><br/>• UI improvements in the phone app<br/><br/><b>Version 0.9.6</b><br/>• Fixed a missing toast after a single CTAP2 assertion via NFC<br/><br/><b>Version 0.9.5</b><br/>• Added support for transaction confirmation via the "txAuthSimple" extension<br/><br/><b>Version 0.9.4</b><br/>• Added support for offline login via the "hmac-secret" extension<br/>• Fixed a crash when extensions were requested with an assertion]]></string>
<string name="label_purchase_button_purchased">Gekauft</string>
<string name="label_purchase_button_available">Kaufen</string>
<string name="label_purchase_button_install_watch_app">Uhr-App nicht installiert</string>
Expand Down
2 changes: 1 addition & 1 deletion companion/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" translatable="false">WearAuthn</string>
<string name="changelog"><![CDATA[<h4>Recent changes</h4><b>Unreleased</b><br/>• NFC functionality now requires an unlocked device<br/><br/><b>Version 0.9.19</b><br/>• Adaptions for recent Android versions<br/>• Fix a crash during reset<br/>• Fix a crash with specific Bluetooth devices<br/><br/><b>Version 0.9.17</b><br/>• Initial CTAP 2.1 support<br/>• User verification is performed before user presence check<br/>• HMAC secret extension takes user verification result into account<br/><br/><b>Version 0.9.16</b><br/>• Improved Bluetooth and complication reliability<br/><br/><b>Version 0.9.15</b><br/>• Updated dependencies to fix incompatibilities<br/><br/><b>Version 0.9.14</b><br/>• German translation<br/>• Improved UI strings and privacy policy<br/>• Added missing email body for \"Report a bug\"<br/><br/><b>Version 0.9.13</b><br/>• Compatibility with Microsoft AAD<br/>• Compliance with CTAP 2.1<br/><br/><b>Version 0.9.12</b><br/>• Bugfixes related to attestation<br/>• Fixed a crash when user verification times out over NFC<br/>• Fixed display of creation dates of stored credentials<br/><br/><b>Version 0.9.11</b><br/>• Bugfix for watches on Android P+<br/><br/><b>Version 0.9.10</b><br/>• Manage your single-factor credentials on the watch<br/><br/><b>Version 0.9.9</b><br/>• Improved interoperability with Windows 10<br/>• Added RP ID to resident key metadata<br/><br/><b>Version 0.9.8</b><br/>• Improved the UI for resets and errors<br/><br/><b>Version 0.9.7</b><br/>• UI improvements in the phone app<br/><br/><b>Version 0.9.6</b><br/>• Fixed a missing toast after a single CTAP2 assertion via NFC<br/><br/><b>Version 0.9.5</b><br/>• Added support for transaction confirmation via the "txAuthSimple" extension<br/><br/><b>Version 0.9.4</b><br/>• Added support for offline login via the "hmac-secret" extension<br/>• Fixed a crash when extensions were requested with an assertion]]></string>
<string name="changelog"><![CDATA[<h4>Recent changes</h4><b>Version 0.9.19</b><br/>• Adaptions for recent Android versions<br/>• Fix a crash during reset<br/>• Fix a crash with specific Bluetooth devices<br/><br/><b>Version 0.9.17</b><br/>• Initial CTAP 2.1 support<br/>• User verification is performed before user presence check<br/>• HMAC secret extension takes user verification result into account<br/><br/><b>Version 0.9.16</b><br/>• Improved Bluetooth and complication reliability<br/><br/><b>Version 0.9.15</b><br/>• Updated dependencies to fix incompatibilities<br/><br/><b>Version 0.9.14</b><br/>• German translation<br/>• Improved UI strings and privacy policy<br/>• Added missing email body for \"Report a bug\"<br/><br/><b>Version 0.9.13</b><br/>• Compatibility with Microsoft AAD<br/>• Compliance with CTAP 2.1<br/><br/><b>Version 0.9.12</b><br/>• Bugfixes related to attestation<br/>• Fixed a crash when user verification times out over NFC<br/>• Fixed display of creation dates of stored credentials<br/><br/><b>Version 0.9.11</b><br/>• Bugfix for watches on Android P+<br/><br/><b>Version 0.9.10</b><br/>• Manage your single-factor credentials on the watch<br/><br/><b>Version 0.9.9</b><br/>• Improved interoperability with Windows 10<br/>• Added RP ID to resident key metadata<br/><br/><b>Version 0.9.8</b><br/>• Improved the UI for resets and errors<br/><br/><b>Version 0.9.7</b><br/>• UI improvements in the phone app<br/><br/><b>Version 0.9.6</b><br/>• Fixed a missing toast after a single CTAP2 assertion via NFC<br/><br/><b>Version 0.9.5</b><br/>• Added support for transaction confirmation via the "txAuthSimple" extension<br/><br/><b>Version 0.9.4</b><br/>• Added support for offline login via the "hmac-secret" extension<br/>• Fixed a crash when extensions were requested with an assertion]]></string>
<string name="url_new_issue" translatable="false">https://github.com/fmeum/WearAuthn/issues/new?assignees=fmeum&amp;template=bug_report.md</string>
<string name="label_purchase_button_purchased">Purchased</string>
<string name="label_purchase_button_pending">Purchase pending</string>
Expand Down

0 comments on commit decc8e3

Please sign in to comment.