Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Passkey button to example app #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sameh-amwal
Copy link
Contributor

No description provided.

@sameh-amwal sameh-amwal force-pushed the feature/add-passkey-button branch from 5de2c1c to 75bef48 Compare October 25, 2023 16:34
@sameh-amwal sameh-amwal force-pushed the feature/add-passkey-button branch from 75bef48 to 9e1ae48 Compare October 25, 2023 16:34
if viewModel.hasPasskeys {
SignInPassKeysButton(action: {
Task {
await viewModel.loginPasskeys(window: sceneDelegate.window!, autofill: false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use .init() instead, and it's advisable to avoid force unwrapping to prevent potential crashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where should the .init() be?

Comment on lines +30 to +32
Image(systemName: self.biometryType == .faceID
? "faceid"
: "touchid")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it will better to move this to computed property will make it more readable what's ur opinion
self.biometryType == .faceID ? "faceid" : "touchid"

Comment on lines +35 to +36
? Color.blue
: Color.red.opacity(0.5))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants