iOS Firebase Authentication: Sign In With Apple Tutorial | Firebase Bootcamp #5

  Рет қаралды 17,395

Swiftful Thinking

Swiftful Thinking

Күн бұрын

Пікірлер: 65
@abenstirling
@abenstirling 23 күн бұрын
I had my bundle ID wrong in firebase! Thanks for the content to help me fix it! Live long & swift on 🖖
@leneil46
@leneil46 Жыл бұрын
Happy to see you back!!!!!!!🎉
@andresraigoza2082
@andresraigoza2082 Жыл бұрын
This is awesome! Thank you so much for taking the time of cleaning up the code, this could be the trickiest part sometimes. I loved the way you implemented the completionHandler in SignInAppleHelper, it made me realize that closures are "Reference Type" in Swift 😮, I've been needing this so many times 😅. You definitely stand out compared with the other Swift KZbin Channels.
@SigmaPC94
@SigmaPC94 Жыл бұрын
Thanks Nick but why it has to be so complex when it comes to the iOS Signin ?
@karaokedeconstruction
@karaokedeconstruction Жыл бұрын
i miss the intro music but i'm glad you're back with videos
@georgekoukouris2347
@georgekoukouris2347 11 ай бұрын
Thanks a lot for this awesome tutorial! I've been following this playlist for a few videos now and this definitely went over my head at some points. Need to watch the concurrency playlist. Very helpful to see how you deal with problems and your way of debugging errors.
@TonyLeung-e5u
@TonyLeung-e5u 2 ай бұрын
You are legend! Great work👏
@omerfarukozturk9720
@omerfarukozturk9720 Жыл бұрын
This is awesome! Great content
@konstantin7566
@konstantin7566 8 ай бұрын
This playlist is very cool. Thank you very much. I ran into a problem, memory leaks, as I understand it. It was worth logging in with Apple, so now the application doesn't even start and xcode writes that it starts consuming too much memory. As I understood it, this is a firebase problem, but the rollback to the old versions did not give any result, alas.
@mahoozi.97
@mahoozi.97 10 ай бұрын
25:31 I asked you regarding displaName on other tutorial, on this function I think should be used OAuthProvider.appleCredential rather than OAuthProvider.credential , but when I changed that I faced this error : Failed: Unable to parse the ID Token.
@reinaldof
@reinaldof Жыл бұрын
Thanks for sharing your high level knowledge, Nick.
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
Glad it was helpful!
@vladimirmoor
@vladimirmoor Жыл бұрын
Fantastic work! Thanks a lot, Nick!
@nathandrake6722
@nathandrake6722 Жыл бұрын
You are a lifesaver that's all i'm saying and I haven't watched the video yet
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
Enjoy! 🤙🚀
@ZirohStory
@ZirohStory 3 ай бұрын
Can Sign In be this complicated? Thanks to this, I learned a lot about swift. This frustrates me, but I have to make money by making apps. Thank you so much.
@도레미파솔-g4r
@도레미파솔-g4r Жыл бұрын
does it matter further lectures if I don't implement appla login here? Well, I wanna pay apple dev account little more later :(
@30guarino
@30guarino Жыл бұрын
Holy Sh*t writing code to sign in with Apple was like we were hacking into the U.S Embassy lol....Great job!
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
Haha yea it really is! I'm expecting Apple will update the API and I'll have to update this video eventually lol
@literallyshane4306
@literallyshane4306 Жыл бұрын
haha!
@labudsoft
@labudsoft 7 ай бұрын
Is there a way of doing this without using an UIKit? It seems to create as much trouble as it solves
@SwiftfulThinking
@SwiftfulThinking 7 ай бұрын
No unfortunately, there’s a SwiftUI way of implementing Apple SSO but it doesn’t work well with Firebase Auth. If they release an easier way, I will 100% replace this video with it
@labudsoft
@labudsoft 7 ай бұрын
@@SwiftfulThinking thank you for the reply, great video
@gregas3068
@gregas3068 Жыл бұрын
Hy. Is there really no simpler way to login with Apple to Firebase? I love your style, but this is really A LOT. So much going on here . . Thank you! And really grateful for the gists!!! Beautiful!
@aleixplanasguibas
@aleixplanasguibas Жыл бұрын
Awesome video! I followed the whole series and it's amazing! I just wanted to know how can I unwrap the name of the user in apple signin? I can't manage to get the name and set it to the DBUser or print it in any way. Any help? Thank you for your work!
@kavinda_dilshan_paramsoodi
@kavinda_dilshan_paramsoodi Жыл бұрын
Thank you, Nick. Very helpful. I've never implemented Sign in with apple as I still don't have a paid developer account.😍 I will watch this again hopefully this year after getting my developer account.
@4bh1nav
@4bh1nav Жыл бұрын
Welcome back!
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
Thanks!!
@jehanpoplife
@jehanpoplife Жыл бұрын
Thanks you so much, you are incredible, that helped me more than you could even think, great great work !
@NickGo
@NickGo Жыл бұрын
This is amazing. Thank you so much for all the details!
@tchendoh
@tchendoh Жыл бұрын
Great content! Everything but the sound is great. You need a better mic/sound setup. :)
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
Haha yea I actually have a mic but I didn’t realize the fan on my computer was going off when recording, so I tried to edit the sound 😭😭😭 I’ve since bought a new MacBook M2 and it’s super quiet 😎
@tchendoh
@tchendoh Жыл бұрын
@@SwiftfulThinking ahah all right.
@ІванФіліпчук-н8э
@ІванФіліпчук-н8э Жыл бұрын
do you have this code on github?
@milanlabus1582
@milanlabus1582 7 ай бұрын
Is this code on Github?
@FFHH-l9b
@FFHH-l9b 4 ай бұрын
Your email is visible at 52:06
@co-park
@co-park Жыл бұрын
Dude I love you
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
ily2
@co-park
@co-park Жыл бұрын
@@SwiftfulThinking btw, think you could do a vid on persisting apple login for Apple+FirebaseAuth combo? I managed to do it, but doesn't feel right
@SwiftfulThinking
@SwiftfulThinking Жыл бұрын
@@co-park Firebase automatically persists the authentication. If your UI is putting users back to the login screen, then it’s an issue with your UI code and not Firebase 🤔
@co-park
@co-park Жыл бұрын
@@SwiftfulThinking Are you saying I could do something like: var body: some View { switch Auth.auth().currentUser { case nil: LoginView() default: HomeView() } } And it would persist the user regardless of sign in method? If so, how long do these sessions persist.
@davehall6001
@davehall6001 7 ай бұрын
great video but.....just too much for me to consume at this moment. Presentation is very confusing and it's gonna take me couple or triple times to watch this video to get it to work!
@Spacer-l3j
@Spacer-l3j 6 ай бұрын
don't bother...There is alternatives for this on KZbin from Kavasoft. He has Sign in with Apple in a single view
@sourPollo
@sourPollo Жыл бұрын
no source code? :/
@magicsaviola
@magicsaviola Жыл бұрын
Please sign in with facebook
@mmendes6780
@mmendes6780 Жыл бұрын
So handsome
@cinquain0
@cinquain0 Жыл бұрын
Dude you are really nuking this. You’re making it way more complex than it needs to be. Your code is so complex it’s dumb
@Spacer-l3j
@Spacer-l3j 6 ай бұрын
Imagine having a senior lead in your team with his mentality. God...his code is so complex and dumb i don't understand why
@mjboswell_
@mjboswell_ 2 ай бұрын
Just a heads up: handling Apple's response has changed since the creation of this video (see line of code below). The provider is no longer required, and has been replaced by fullName, which is of type 'PersonNameComponents' 🥴 let credential = OAuthProvider.appleCredential(withIDToken: idTokenString, rawNonce: nonce, fullName: appleIDCredential.fullName)
@eatnate
@eatnate 21 сағат бұрын
Thank you
@jasapvideo4859
@jasapvideo4859 Жыл бұрын
I ran into a problem when trying to add Sign in With Apple capabilities under signing & capabilities on Xcode. I have also added capability under my app developer profile on the website as well. Have gotten certificates for everything else I needed but am still getting errors for “missing Sign in with Apple” and “missing com.apple.developer.applesignin entitlement.
@Kuraudo_VII
@Kuraudo_VII Жыл бұрын
I don't understand why you are making this so complicated by going at such a length to recreate the whole flow that the SwiftUI Apple Sign In Button provides...? import SwiftUI import AuthenticationServices import FirebaseAuth struct Logins: View { @State var currentNonce = "" var body: some View { VStack { SignInWithAppleButton { request in let nonce = randomNonceString() //Use a function to generate nonce currentNonce = nonce request.requestedScopes = [.email, .fullName] request.nonce = sha256(nonce) //Use a function to SHA256 encrypt } onCompletion: { result in handleAppleSignIn(with: result) } .frame(height: 40) .cornerRadius(8) } } func handleAppleSignIn(with result: Result) { switch result { case .success(let auth): switch auth.credential { case let credential as ASAuthorizationAppleIDCredential: guard let appleIDToken = credential.identityToken else { return } guard let idTokenString = String(data: appleIDToken, encoding: .utf8) else { return } // Initialize a Firebase credential, including the user's full name. let credential = OAuthProvider.appleCredential( withIDToken: idTokenString, rawNonce: currentNonce, fullName: credential.fullName ) // Sign in with Firebase. Auth.auth().signIn(with: credential) { result, error in if let error = error { print(error.localizedDescription) return } // User is signed in to Firebase with Apple. // Continue with your logic } default: print("Error in retrieving auth info") } case .failure(let error): print("Sign in with Apple failed: \(error.localizedDescription)") } } } You can also extract currentNonce and the handleAppleSignIn function into a ModelData Object and pass it through as a environmentObject keep things cleaner.
@Septix
@Septix 10 ай бұрын
Cannot thank you enough, saved me an hour. Did a few tweaks and its working like charm 15.2
@Spacer-l3j
@Spacer-l3j 6 ай бұрын
Brilliant... this is not the only video that he made it very complicated. Sometimes he is very dumb and i don't know why
@pigreatlor
@pigreatlor 5 ай бұрын
is this the entire code you used for the apple sign in model?
@Kuraudo_VII
@Kuraudo_VII 5 ай бұрын
@@pigreatlor pretty much. But that was a while ago. Are you running into any issues?
@pigreatlor
@pigreatlor 5 ай бұрын
@@Kuraudo_VII no not yet, ive been looking at the tutorial but at the end i didnt understand all of it. yours seems very short hehe will try it in the next few days. if i run into problems i'll comment here again if you dont mind
@PavloMoroz-p9w
@PavloMoroz-p9w Жыл бұрын
func signInApple() async throws { let signInAppleResultsTokens = try await signInAppleHelper.startSignInWithAppleFlow() let authDataResult = try await self.authenticationManager.signInWithApple(tokens: signInAppleResultsTokens) let user = DatabaseUser(auth: authDataResult) try userManager.createNewUser(user: user) } When we tap to signInApple we create "updating" our DB for currect document. It's wrong?
Connect Firebase to Xcode: A Step-by-Step Tutorial | Firebase Bootcamp #1
21:07
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Unleash Custom Alerts in SwiftUI! 🔥🔥
8:03
SwiftUI Codes
Рет қаралды 175
Learn Firebase in iOS App Development with Swift | Firebase Bootcamp #0
5:12
Get Started with Firebase Firestore in iOS | Firebase Bootcamp #8
39:06
Swiftful Thinking
Рет қаралды 14 М.