Skip to content

Commit 0dc9826

Browse files
committed
Biometric login option in profile screen is handling by device support
1 parent 0b6ba90 commit 0dc9826

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

GoInfoGame/GoInfoGame/Login/View/PosmLogin.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ struct PosmLoginView: View {
1515
@State private var isShowingAlert = false
1616
@State private var shouldLogin = false
1717

18-
@State private var shouldShowAlert = false
19-
2018
@State private var selectedEnvironment: APIEnvironment = .production
2119
@State private var showAlert = false
2220

GoInfoGame/GoInfoGame/UserProfile/View/UserProfileView.swift

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@ struct UserProfileView: View {
4040
}
4141
.padding([.bottom], 200)
4242

43-
BiometricToggleView(isEnabled: $useBiometricID) {status in
44-
if status {
45-
showPasswordAuthenticationView = true
46-
} else {
47-
SessionManager.shared.logout(environment: APIConfiguration.shared.environment, clearBiometricCreds: true)
43+
if BiometricAuthManager.canEvaluateBiometrics() {
44+
BiometricToggleView(isEnabled: $useBiometricID) {status in
45+
if status {
46+
showPasswordAuthenticationView = true
47+
} else {
48+
SessionManager.shared.logout(environment: APIConfiguration.shared.environment, clearBiometricCreds: true)
49+
}
4850
}
49-
}
50-
.padding([.bottom], 30)
51-
51+
.padding([.bottom], 30)
52+
}
5253

5354
logOutButton
5455

0 commit comments

Comments
 (0)