Skip to content

Commit a6679dd

Browse files
authored
Merge pull request #125 from msirringhaus/pinnotset
Add error page for PINNotSet-errors
2 parents 4f71a88 + a1c1751 commit a6679dd

8 files changed

Lines changed: 117 additions & 80 deletions

File tree

credentialsd-common/src/model.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ pub enum Error {
260260
/// Note that this is different than exhausting the PIN count that fully
261261
/// locks out the device.
262262
PinAttemptsExhausted,
263+
/// The RP requires user verification, but the device has no PIN/Biometrics set.
264+
PinNotSet,
263265
// TODO: We may want to hide the details on this variant from the public API.
264266
/// Something went wrong with the credential service itself, not the authenticator.
265267
Internal(String),
@@ -271,6 +273,7 @@ impl Display for Error {
271273
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
272274
match self {
273275
Self::AuthenticatorError => f.write_str("AuthenticatorError"),
276+
Self::PinNotSet => f.write_str("PinNotSet"),
274277
Self::NoCredentials => f.write_str("NoCredentials"),
275278
Self::CredentialExcluded => f.write_str("CredentialExcluded"),
276279
Self::PinAttemptsExhausted => f.write_str("PinAttemptsExhausted"),

credentialsd-common/src/server.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ impl TryFrom<&Value<'_>> for crate::model::Error {
219219
let err_code: &str = value.downcast_ref()?;
220220
let err = match err_code {
221221
"AuthenticatorError" => crate::model::Error::AuthenticatorError,
222+
"PinNotSet" => crate::model::Error::PinNotSet,
222223
"NoCredentials" => crate::model::Error::NoCredentials,
223224
"CredentialExcluded" => crate::model::Error::CredentialExcluded,
224225
"PinAttemptsExhausted" => crate::model::Error::PinAttemptsExhausted,
@@ -436,6 +437,7 @@ impl TryFrom<&Structure<'_>> for crate::model::UsbState {
436437
let err_code: &str = value.downcast_ref()?;
437438
let err = match err_code {
438439
"AuthenticatorError" => crate::model::Error::AuthenticatorError,
440+
"PinNotSet" => crate::model::Error::PinNotSet,
439441
"NoCredentials" => crate::model::Error::NoCredentials,
440442
"CredentialExcluded" => crate::model::Error::CredentialExcluded,
441443
"PinAttemptsExhausted" => crate::model::Error::PinAttemptsExhausted,
@@ -558,6 +560,7 @@ impl TryFrom<&Structure<'_>> for crate::model::NfcState {
558560
let err_code: &str = value.downcast_ref()?;
559561
let err = match err_code {
560562
"AuthenticatorError" => crate::model::Error::AuthenticatorError,
563+
"PinNotSet" => crate::model::Error::PinNotSet,
561564
"NoCredentials" => crate::model::Error::NoCredentials,
562565
"CredentialExcluded" => crate::model::Error::CredentialExcluded,
563566
"PinAttemptsExhausted" => crate::model::Error::PinAttemptsExhausted,

credentialsd-ui/po/credentialsd-ui.pot

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgstr ""
99
"Project-Id-Version: credentialsd-ui\n"
1010
"Report-Msgid-Bugs-To: \"https://github.com/linux-credentials/credentialsd/"
1111
"issues\"\n"
12-
"POT-Creation-Date: 2025-11-28 12:53-0600\n"
12+
"POT-Creation-Date: 2026-02-03 10:40+0100\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1515
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -21,7 +21,7 @@ msgstr ""
2121

2222
#: data/xyz.iinuwa.credentialsd.CredentialsUi.desktop.in.in:2
2323
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:8
24-
#: src/gui/view_model/gtk/mod.rs:380
24+
#: src/gui/view_model/gtk/mod.rs:385
2525
msgid "Credential Manager"
2626
msgstr ""
2727

@@ -58,7 +58,6 @@ msgstr ""
5858

5959
#. developer_name tag deprecated with Appstream 1.0
6060
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:34
61-
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:37
6261
msgid "Isaiah Inuwa"
6362
msgstr ""
6463

@@ -97,72 +96,75 @@ msgstr ""
9796
msgid "Connect a security key"
9897
msgstr ""
9998

100-
#: data/resources/ui/window.ui:138
99+
#: data/resources/ui/window.ui:139
101100
msgid "Scan the QR code to connect your device"
102101
msgstr ""
103102

104-
#: data/resources/ui/window.ui:183 data/resources/ui/window.ui:189
103+
#: data/resources/ui/window.ui:184 data/resources/ui/window.ui:190
105104
msgid "Choose credential"
106105
msgstr ""
107106

108-
#: data/resources/ui/window.ui:212
107+
#: data/resources/ui/window.ui:214
109108
msgid "Complete"
110109
msgstr ""
111110

112-
#: data/resources/ui/window.ui:218
111+
#: data/resources/ui/window.ui:220
113112
msgid "Done!"
114113
msgstr ""
115114

116-
#: data/resources/ui/window.ui:229
115+
#: data/resources/ui/window.ui:231
117116
msgid "Something went wrong."
118117
msgstr ""
119118

120-
#: data/resources/ui/window.ui:242 src/gui/view_model/mod.rs:244
119+
#: data/resources/ui/window.ui:244 src/gui/view_model/mod.rs:290
121120
msgid ""
122121
"Something went wrong while retrieving a credential. Please try again later "
123122
"or use a different authenticator."
124123
msgstr ""
125124

126-
#: src/gui/view_model/gtk/mod.rs:146
125+
#: src/gui/view_model/gtk/mod.rs:147
127126
msgid "Enter your PIN. One attempt remaining."
128127
msgid_plural "Enter your PIN. %d attempts remaining."
129128
msgstr[0] ""
130129
msgstr[1] ""
131130

132-
#: src/gui/view_model/gtk/mod.rs:152
131+
#: src/gui/view_model/gtk/mod.rs:153
133132
msgid "Enter your PIN."
134133
msgstr ""
135134

136-
#: src/gui/view_model/gtk/mod.rs:162
135+
#: src/gui/view_model/gtk/mod.rs:163
137136
msgid "Touch your device again. One attempt remaining."
138137
msgid_plural "Touch your device again. %d attempts remaining."
139138
msgstr[0] ""
140139
msgstr[1] ""
141140

142-
#: src/gui/view_model/gtk/mod.rs:168
143-
#: src/gui/view_model/gtk/mod.rs:173
141+
#: src/gui/view_model/gtk/mod.rs:169
142+
msgid "Touch your device."
143+
msgstr ""
144+
145+
#: src/gui/view_model/gtk/mod.rs:174
144146
msgid "Touch your device"
145147
msgstr ""
146148

147-
#: src/gui/view_model/gtk/mod.rs:176
149+
#: src/gui/view_model/gtk/mod.rs:177
148150
msgid "Scan the QR code with your device to begin authentication."
149151
msgstr ""
150152

151-
#: src/gui/view_model/gtk/mod.rs:186
153+
#: src/gui/view_model/gtk/mod.rs:187
152154
msgid ""
153155
"Connecting to your device. Make sure both devices are near each other and "
154156
"have Bluetooth enabled."
155157
msgstr ""
156158

157-
#: src/gui/view_model/gtk/mod.rs:194
159+
#: src/gui/view_model/gtk/mod.rs:195
158160
msgid "Device connected. Follow the instructions on your device"
159161
msgstr ""
160162

161-
#: src/gui/view_model/gtk/mod.rs:320
163+
#: src/gui/view_model/gtk/mod.rs:321
162164
msgid "Insert your security key."
163165
msgstr ""
164166

165-
#: src/gui/view_model/gtk/mod.rs:339
167+
#: src/gui/view_model/gtk/mod.rs:340
166168
msgid "Multiple devices found. Please select with which to proceed."
167169
msgstr ""
168170

@@ -211,7 +213,7 @@ msgstr ""
211213
#: src/gui/view_model/mod.rs:96
212214
msgid ""
213215
"<b>\"%s2\"</b> (process ID: %i1, binary: %s3) is asking to create a "
214-
"credential to sign in to \"%s1\". Only proceed if you trust this process."
216+
"credential to register at \"%s1\". Only proceed if you trust this process."
215217
msgstr ""
216218

217219
#. TRANSLATORS: %s1 is the "relying party" (think: domain name) where the request is coming from
@@ -224,26 +226,30 @@ msgid ""
224226
"to sign in to \"%s1\". Only proceed if you trust this process."
225227
msgstr ""
226228

227-
#: src/gui/view_model/mod.rs:224
229+
#: src/gui/view_model/mod.rs:227
228230
msgid "Failed to select credential from device."
229231
msgstr ""
230232

231233
#: src/gui/view_model/mod.rs:281
232-
#: src/gui/view_model/mod.rs:332
233234
msgid "No matching credentials found on this authenticator."
234235
msgstr ""
235236

236237
#: src/gui/view_model/mod.rs:284
237-
#: src/gui/view_model/mod.rs:335
238238
msgid ""
239239
"No more PIN attempts allowed. Try removing your device and plugging it back "
240240
"in."
241241
msgstr ""
242242

243-
#: src/gui/view_model/mod.rs:290
243+
#: src/gui/view_model/mod.rs:287
244+
msgid ""
245+
"This server requires your device to have additional protection like a PIN, "
246+
"which is not set. Please set a PIN for this device and try again."
247+
msgstr ""
248+
249+
#: src/gui/view_model/mod.rs:293
244250
msgid "This credential is already registered on this authenticator."
245251
msgstr ""
246252

247-
#: src/gui/view_model/mod.rs:389
253+
#: src/gui/view_model/mod.rs:395
248254
msgid "Something went wrong. Try again later or use a different authenticator."
249255
msgstr ""

credentialsd-ui/po/de_DE.po

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: PACKAGE VERSION\n"
44
"Report-Msgid-Bugs-To: \"https://github.com/linux-credentials/credentialsd/"
55
"issues\"\n"
6-
"POT-Creation-Date: 2025-10-30 14:43+0100\n"
6+
"POT-Creation-Date: 2026-02-03 10:40+0100\n"
77
"PO-Revision-Date: 2025-10-10 14:45+0200\n"
88
"Last-Translator: Martin Sirringhaus <martin.sirringhaus@suse.com>\n"
99
"Language: de_DE\n"
@@ -14,7 +14,7 @@ msgstr ""
1414

1515
#: data/xyz.iinuwa.credentialsd.CredentialsUi.desktop.in.in:2
1616
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:8
17-
#: src/gui/view_model/gtk/mod.rs:378
17+
#: src/gui/view_model/gtk/mod.rs:385
1818
msgid "Credential Manager"
1919
msgstr "Zugangsdatenmanager"
2020

@@ -81,84 +81,84 @@ msgid "Devices"
8181
msgstr "Geräte"
8282

8383
#: data/resources/ui/window.ui:98
84-
msgid "Plug in security key"
85-
msgstr "Stecken Sie Ihren Security-Token ein"
84+
msgid "Connect a security key"
85+
msgstr "Stecken Sie Ihren Security-Token ein."
8686

87-
#: data/resources/ui/window.ui:138
87+
#: data/resources/ui/window.ui:139
8888
msgid "Scan the QR code to connect your device"
8989
msgstr "Scannen Sie den QR-Code, um Ihr Gerät zu verbinden"
9090

91-
#: data/resources/ui/window.ui:183 data/resources/ui/window.ui:189
91+
#: data/resources/ui/window.ui:184 data/resources/ui/window.ui:190
9292
msgid "Choose credential"
9393
msgstr "Wählen Sie Zugangsdaten aus"
9494

95-
#: data/resources/ui/window.ui:212
95+
#: data/resources/ui/window.ui:214
9696
msgid "Complete"
9797
msgstr "Abgeschlossen"
9898

99-
#: data/resources/ui/window.ui:218
99+
#: data/resources/ui/window.ui:220
100100
msgid "Done!"
101101
msgstr "Fertig!"
102102

103-
#: data/resources/ui/window.ui:229
103+
#: data/resources/ui/window.ui:231
104104
msgid "Something went wrong."
105105
msgstr "Etwas ist schief gegangen."
106106

107-
#: data/resources/ui/window.ui:242 src/gui/view_model/mod.rs:280
107+
#: data/resources/ui/window.ui:244 src/gui/view_model/mod.rs:290
108108
msgid ""
109109
"Something went wrong while retrieving a credential. Please try again later "
110110
"or use a different authenticator."
111111
msgstr ""
112112
"Beim Abrufen Ihrer Zugangsdaten ist ein Fehler aufgetreten. Versuchen Sie es "
113113
"später wieder, oder verwenden Sie einen anderen Security-Token."
114114

115-
#: src/gui/view_model/gtk/mod.rs:145
115+
#: src/gui/view_model/gtk/mod.rs:147
116116
#, fuzzy
117117
msgid "Enter your PIN. One attempt remaining."
118118
msgid_plural "Enter your PIN. %d attempts remaining."
119119
msgstr[0] "Geben Sie Ihren PIN ein. Sie haben nur noch einen Versuch."
120120
msgstr[1] "Geben Sie Ihren PIN ein. Sie haben noch %d Versuche."
121121

122-
#: src/gui/view_model/gtk/mod.rs:151
122+
#: src/gui/view_model/gtk/mod.rs:153
123123
msgid "Enter your PIN."
124124
msgstr "Geben Sie Ihren PIN ein."
125125

126-
#: src/gui/view_model/gtk/mod.rs:160
126+
#: src/gui/view_model/gtk/mod.rs:163
127127
msgid "Touch your device again. One attempt remaining."
128128
msgid_plural "Touch your device again. %d attempts remaining."
129129
msgstr[0] "Berühren Sie Ihr Gerät. Sie haben nur noch einen Versuch."
130130
msgstr[1] "Berühren Sie nochmal Ihr Gerät. Sie haben nur noch %d Versuche."
131131

132-
#: src/gui/view_model/gtk/mod.rs:166
132+
#: src/gui/view_model/gtk/mod.rs:169
133133
msgid "Touch your device."
134134
msgstr "Berühren Sie Ihr Gerät."
135135

136-
#: src/gui/view_model/gtk/mod.rs:171
136+
#: src/gui/view_model/gtk/mod.rs:174
137137
msgid "Touch your device"
138138
msgstr "Berühren Sie Ihr Gerät."
139139

140-
#: src/gui/view_model/gtk/mod.rs:174
140+
#: src/gui/view_model/gtk/mod.rs:177
141141
msgid "Scan the QR code with your device to begin authentication."
142142
msgstr ""
143143
"Scannen Sie den QR code mit ihrem Gerät um die Authentifizierung zu beginnen."
144144

145-
#: src/gui/view_model/gtk/mod.rs:184
145+
#: src/gui/view_model/gtk/mod.rs:187
146146
msgid ""
147147
"Connecting to your device. Make sure both devices are near each other and "
148148
"have Bluetooth enabled."
149149
msgstr ""
150150
"Verbindung zu Ihrem Gerät wird aufgebaut. Stellen Sie sicher, dass beide "
151151
"Geräte nah beieinander sind und Bluetooth aktiviert haben."
152152

153-
#: src/gui/view_model/gtk/mod.rs:192
153+
#: src/gui/view_model/gtk/mod.rs:195
154154
msgid "Device connected. Follow the instructions on your device"
155155
msgstr "Verbindung hergestellt. Folgen Sie den Anweisungen auf Ihrem Gerät."
156156

157-
#: src/gui/view_model/gtk/mod.rs:318
157+
#: src/gui/view_model/gtk/mod.rs:321
158158
msgid "Insert your security key."
159159
msgstr "Stecken Sie Ihren Security-Token ein."
160160

161-
#: src/gui/view_model/gtk/mod.rs:334
161+
#: src/gui/view_model/gtk/mod.rs:340
162162
msgid "Multiple devices found. Please select with which to proceed."
163163
msgstr "Mehrere Geräte gefunden. Bitte wählen Sie einen aus, um fortzufahren."
164164

@@ -179,7 +179,7 @@ msgid "Linked Device"
179179
msgstr "Verbundenes Gerät"
180180

181181
#: src/gui/view_model/gtk/device.rs:61
182-
msgid "A security key or card (NFC)"
182+
msgid "An security key or card (NFC)"
183183
msgstr "Ein NFC-Gerät"
184184

185185
#: src/gui/view_model/gtk/device.rs:62
@@ -209,8 +209,9 @@ msgid ""
209209
"<b>\"%s2\"</b> (process ID: %i1, binary: %s3) is asking to create a "
210210
"credential to register at \"%s1\". Only proceed if you trust this process."
211211
msgstr ""
212-
"<b>\"%s2\"</b> (Prozess-ID: %i1, ausführbare Datei: %s3) möchte neue Zugangsdaten erstellen, "
213-
"um Sie bei \"%s1\" zu registrieren. Fahren Sie nur fort, wenn Sie diesem Prozess vertrauen."
212+
"<b>\"%s2\"</b> (Prozess-ID: %i1, ausführbare Datei: %s3) möchte neue "
213+
"Zugangsdaten erstellen, um Sie bei \"%s1\" zu registrieren. Fahren Sie nur "
214+
"fort, wenn Sie diesem Prozess vertrauen."
214215

215216
#. TRANSLATORS: %s1 is the "relying party" (think: domain name) where the request is coming from
216217
#. TRANSLATORS: %s2 is the application name (e.g.: firefox) where the request is coming from, <b></b> must be left untouched to make the name bold
@@ -221,30 +222,39 @@ msgid ""
221222
"<b>\"%s2\"</b> (process ID: %i1, binary: %s3) is asking to use a credential "
222223
"to sign in to \"%s1\". Only proceed if you trust this process."
223224
msgstr ""
224-
"<b>\"%s2\"</b> (Prozess-ID: %i1, ausführbare Datei: %s3) möchte Zugangsdaten abrufen, um "
225-
"Sie bei \"%s1\" anzumelden. Fahren Sie nur fort, wenn Sie diesem Prozess vertrauen."
225+
"<b>\"%s2\"</b> (Prozess-ID: %i1, ausführbare Datei: %s3) möchte Zugangsdaten "
226+
"abrufen, um Sie bei \"%s1\" anzumelden. Fahren Sie nur fort, wenn Sie diesem "
227+
"Prozess vertrauen."
226228

227-
#: src/gui/view_model/mod.rs:220
229+
#: src/gui/view_model/mod.rs:227
228230
msgid "Failed to select credential from device."
229231
msgstr "Zugangsdaten vom Gerät konnten nicht ausgewählt werden."
230232

231-
#: src/gui/view_model/mod.rs:274
233+
#: src/gui/view_model/mod.rs:281
232234
msgid "No matching credentials found on this authenticator."
233235
msgstr "Keine passenden Zugangsdaten auf diesem Gerät gefunden."
234236

235-
#: src/gui/view_model/mod.rs:277
237+
#: src/gui/view_model/mod.rs:284
236238
msgid ""
237239
"No more PIN attempts allowed. Try removing your device and plugging it back "
238240
"in."
239241
msgstr ""
240242
"Keine weiteren PIN-Eingaben erlaubt. Versuchen Sie ihr Gerät aus- und wieder "
241243
"einzustecken."
242244

243-
#: src/gui/view_model/mod.rs:283
245+
#: src/gui/view_model/mod.rs:287
246+
msgid ""
247+
"This server requires your device to have additional protection like a PIN, "
248+
"which is not set. Please set a PIN for this device and try again."
249+
msgstr ""
250+
"Für diesen Server benötigt ihr Gerät eine zusätzliche Absicherung, z.B. einen PIN. "
251+
"Bitte setzen Sie einen PIN für ihr Gerät und versuchen Sie es erneut."
252+
253+
#: src/gui/view_model/mod.rs:293
244254
msgid "This credential is already registered on this authenticator."
245255
msgstr "Diese Zugangsdaten sind bereits auf diesem Gerät registriert."
246256

247-
#: src/gui/view_model/mod.rs:331
257+
#: src/gui/view_model/mod.rs:395
248258
msgid "Something went wrong. Try again later or use a different authenticator."
249259
msgstr ""
250260
"Es ist ein Fehler aufgetreten. Bitte versuchen Sie es später noch einmal, "

0 commit comments

Comments
 (0)