Build a FaceID Authentication System in SwiftUI

  Рет қаралды 36,515

DesignCode

DesignCode

Күн бұрын

Create a biometrics authentication system in SwiftUI
In this tutorial, we'll build an authentication system with FaceID and TouchID, and fallback to a login with credentials if FaceID fails or if the device doesn't support biometrics auth.
🔗 Links mentioned in the video:
➡ Firebase Auth tutorial: designcode.io/swiftui-advance...
➡ Local Authentication documentation: developer.apple.com/documenta...
➡ LAContext documentation: developer.apple.com/documenta...
➡ Biometry type documentation: developer.apple.com/documenta...
✏️ Access the written version of this tutorial and the source files:
➡ Part 1: designcode.io/quick-apps-swif...
➡ Part 2: designcode.io/quick-apps-swif...
➡ Part 3: designcode.io/quick-apps-swif...
👩🏻‍💻 Source code on Github:
➡ github.com/stephdiep/Biometri...
🪄 Join our channel and unlock members-only perks:
➡ / @designcodeteam
👋🏻 Let's connect!
➡ Twitter: / diepsteph
🎞 Video timestamps
➡ Part 1 - Create the project and code the LoginView
0:00 - Introduction
2:04 - Create Xcode project
3:34 - Code the LoginView
➡ Part 2 - Code the AuthenticationManager
9:54 - Create the AuthenticationManager
10:57 - Update Info.plist file
12:23 - Get biometryType
15:00 - Connect AuthenticationManager to views
15:56 - Add dynamic button based on biometryType
18:24 - Authenticate with biometrics
22:16 - Error handling
➡ Part 3 - Log in and log out flow
24:35 - Connect function to UI
26:18 - Test the application
28:23 - Credentials login
35:34 - Logged in screen
37:12 - Logout process
37:47 - Conclusion - Taking it further
#faceid #swiftui #tutorial

Пікірлер: 27
@richardmurrills1708
@richardmurrills1708 6 ай бұрын
Thank you, I found this really useful. I've been struggling to work out how to get my app to ask for login every time the app is minimised and this helped with that - I simply checked to see if the app was moved to the background rather than building a logout button.
@semilife
@semilife 2 жыл бұрын
Thanks so much Stephanie for fast paced detailed and informative walkthrough of Authentication on iOS devices. Glad to see the informative comments in your source code as I requested previously.
@mindrhythminc.2609
@mindrhythminc.2609 2 жыл бұрын
Thank you Stephanie! Very clear and through explanation of a complicated topic. Cheers!!
@ljubomir_micic
@ljubomir_micic 2 жыл бұрын
Favourite SwiftUI KZbin channel 😄
@nancyh4415
@nancyh4415 2 жыл бұрын
This content is a lifesavior! Thanks!
@LeviM337
@LeviM337 2 жыл бұрын
Amazing content! You’ve got a new subscriber
@fierce2410
@fierce2410 2 жыл бұрын
You rock Stephanie! This was really helpful! One question. At 25:40 when you used Task.init, what is the difference between using Task.init and just Task?
@noelkumar121
@noelkumar121 2 жыл бұрын
Hello, this was a great video! Can you tell me where you got the authenticator icons though?
@DesignCodeTeam
@DesignCodeTeam 2 жыл бұрын
Hi! If you meant the icon of the app itself, it's from shape.so/. If you meant the FaceID and TouchID icons, they're from SF Symbols (developer.apple.com/sf-symbols/) - Stephanie
@Timon460
@Timon460 7 ай бұрын
don't know the reason but it's not showing up images. it's should use sf symbols but button just blank - no image, no text. same situation at real device and simulator. canvas shows fine. did download project from github just make sure it's doesn't work
@SwadikaWarriorYT
@SwadikaWarriorYT 2 жыл бұрын
Thak you , can you make a video on in-app purchases contents and subscriptions ?
@DesignCodeTeam
@DesignCodeTeam 2 жыл бұрын
Hi! Thanks for your suggestion, we'll try to cover this tutorial in the future!
@9mikaela
@9mikaela 2 жыл бұрын
what editor do you use? or theme
@DesignCodeTeam
@DesignCodeTeam 2 жыл бұрын
Hi! I'm using Xcode and the theme is Default (Dark) - Stephanie
@marekroslik7412
@marekroslik7412 2 жыл бұрын
I have a problem. "Trailing closure passed to parameter of type 'NSManagedObjectContext' that does not accept a closure" (.onTapGesture { Task.init{...}). file - LoginView
@rafaelplinio6527
@rafaelplinio6527 8 ай бұрын
Thread 1: Fatal error: No ObservableObject of type found. A View.environmentObject(_:) for may be missing as an ancestor of this view. To fix this error, change all the authenticationManager inside the SWITCH (LoginView) statement to AuthenticationManager(). I don't know why it happened to me, maybe xcode version, who knows.
@GabrielPalOfficial
@GabrielPalOfficial 2 жыл бұрын
The 3 links for the written version of this tutorial are redirecting to the home page.
@DesignCodeTeam
@DesignCodeTeam 2 жыл бұрын
Hi Gabriel! The links should work now! Thanks for reporting it - Stephanie
@nicoletti2000
@nicoletti2000 2 жыл бұрын
I don't get why private(set) so much
@DesignCodeTeam
@DesignCodeTeam 2 жыл бұрын
Hi Hudson, private(set) means that the variable can only be set within the class or struct it's defined it. It's good to restrict the setter of the variables so we cannot modify it from external files. - Stephanie
@chiragpancholi8436
@chiragpancholi8436 2 жыл бұрын
can you suggest how to install Xcode in windows 10 or suggest any direct link where xcode setup get easily.!!
@DesignCodeTeam
@DesignCodeTeam 2 жыл бұрын
Hi! Unfortunately, Xcode is only available on Mac computers. 😬 - Stephanie
@chiragpancholi8436
@chiragpancholi8436 2 жыл бұрын
@@DesignCodeTeam that i know i check thats why im asking for solution because i want to try this 🥺
@Prabhashana
@Prabhashana 2 жыл бұрын
Dream job iOS developers 💕
@tariqAlmazyad
@tariqAlmazyad 2 жыл бұрын
I am living your dream now , and it is awesome ✌🏻😅❤
@Prabhashana
@Prabhashana 2 жыл бұрын
@@tariqAlmazyad 😊😂💕
@rus151980
@rus151980 10 ай бұрын
Cute and smart girl!
Custom Transition Between Screens in SwiftUI - Part 1
13:57
DesignCode
Рет қаралды 68 М.
Build a SwiftUI chat app with Firestore from scratch
48:47
DesignCode
Рет қаралды 53 М.
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 15 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 24 МЛН
Should you Implement Authentication Yourself?
10:38
Ben Awad
Рет қаралды 157 М.
Проверка Face ID в приложении (Swift 5)
10:57
SwiftData Basics in 15 minutes
15:18
CodeWithChris
Рет қаралды 42 М.
FIDO Promises a Life Without Passwords
9:58
IBM Technology
Рет қаралды 399 М.
SwiftUI Biometric Authentication and KeyChain storage
29:00
Stewart Lynch
Рет қаралды 10 М.
Apollo iOS
27:56
loftblog
Рет қаралды 4,8 М.
Build a trivia game app from scratch with this SwiftUI crash course
1:01:20
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 15 МЛН