Force TOTP
This commit is contained in:
parent
5d32bfec95
commit
4d88786fb6
3 changed files with 7 additions and 6 deletions
|
@ -74,7 +74,7 @@ class OneTimePassword @Inject constructor(
|
|||
|
||||
private fun configure() {
|
||||
ensureKey()
|
||||
pin = sp.getString(R.string.key_smscommunicator_otp_pin, "").trim()
|
||||
pin = sp.getString(R.string.key_smscommunicator_otp_password, "").trim()
|
||||
}
|
||||
|
||||
private fun generateOneTimePassword(counter: Long): String {
|
||||
|
|
|
@ -1707,7 +1707,7 @@
|
|||
|
||||
<string name="key_smscommunicator_otp_enabled" translatable="false">smscommunicator_otp_enabled</string>
|
||||
<string name="key_smscommunicator_otp_name" translatable="false">smscommunicator_otp_name</string>
|
||||
<string name="key_smscommunicator_otp_pin" translatable="false">smscommunicator_otp_pin</string>
|
||||
<string name="key_smscommunicator_otp_password" translatable="false">smscommunicator_otp_password</string>
|
||||
<string name="key_smscommunicator_otp_secret" translatable="false">smscommunicator_otp_secret</string>
|
||||
|
||||
<string name="smscommunicator_default_user_display_name" comment="This is default user display name, shown by Authenticators">User</string>
|
||||
|
|
|
@ -28,13 +28,14 @@
|
|||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:defaultValue="true"
|
||||
android:enabled="false"
|
||||
android:key="@string/key_smscommunicator_otp_enabled"
|
||||
android:title="@string/smscommunicator_otp_enabled"
|
||||
android:summary="@string/smscommunicator_otp_enabled_summary"/>
|
||||
android:summary="@string/smscommunicator_otp_enabled_summary"
|
||||
android:title="@string/smscommunicator_otp_enabled" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:key="@string/key_smscommunicator_otp_pin"
|
||||
android:key="@string/key_smscommunicator_otp_password"
|
||||
android:summary="@string/smscommunicator_otp_pin_summary"
|
||||
android:title="@string/smscommunicator_otp_pin"
|
||||
validate:testType="pinStrength" />
|
||||
|
|
Loading…
Reference in a new issue