mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Support FIDO authentication with devices that don’t have a PIN code set
This commit is contained in:
parent
17f3d365b8
commit
afa6dff0b9
3 changed files with 21 additions and 1 deletions
|
|
@ -357,7 +357,7 @@ class AppState: ObservableObject {
|
|||
|
||||
var fido2: FIDO2?
|
||||
|
||||
func createAndSubmitSecurityKeyAssertationWithPinCode(_ pinCode: String, sessionData: AppleSessionData, authOptions: AuthOptionsResponse) {
|
||||
func createAndSubmitSecurityKeyAssertationWithPinCode(_ pinCode: String?, sessionData: AppleSessionData, authOptions: AuthOptionsResponse) {
|
||||
self.presentedSheet = .securityKeyTouchToConfirm
|
||||
|
||||
guard let fsaChallenge = authOptions.fsaChallenge else {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ struct SignInSecurityKeyPinView: View {
|
|||
Button("Cancel", action: { isPresented = false })
|
||||
.keyboardShortcut(.cancelAction)
|
||||
Spacer()
|
||||
|
||||
Button("PIN not set", action: submitWithoutPinCode)
|
||||
|
||||
ProgressButton(isInProgress: appState.isProcessingAuthRequest,
|
||||
action: submitPinCode) {
|
||||
Text("Continue")
|
||||
|
|
@ -50,6 +53,10 @@ struct SignInSecurityKeyPinView: View {
|
|||
func submitPinCode() {
|
||||
appState.createAndSubmitSecurityKeyAssertationWithPinCode(pin, sessionData: sessionData, authOptions: authOptions)
|
||||
}
|
||||
|
||||
func submitWithoutPinCode() {
|
||||
appState.createAndSubmitSecurityKeyAssertationWithPinCode(nil, sessionData: sessionData, authOptions: authOptions)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
|
|
|||
|
|
@ -237,6 +237,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"%@ (%@)" : {
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "%1$@ (%2$@)"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"%@ %@ %@" : {
|
||||
"localizations" : {
|
||||
"ar" : {
|
||||
|
|
@ -17907,6 +17917,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"PIN not set" : {
|
||||
|
||||
},
|
||||
"Platforms" : {
|
||||
"localizations" : {
|
||||
|
|
|
|||
Loading…
Reference in a new issue