Getting started with Sign in with Apple using Firebase Authentication on Apple platforms

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.ค. 2024
  • In this video, Firebase Senior Developer Advocate ‪@PeterFriese‬ will walk you through how to get started with sign in with Apple on iOS and Apple's other platforms. Wondering how to implement the sign in with Apple button, and how to structure your app? Curious about what a nonce is and why it protects your app against a replay attack? Wonder no more, Peter has you covered!
    Chapters:
    0:00 What we're going to cover in this video
    0:49 The sample app
    1:28 Adding the SDK
    2:00 Enabling Firebase Authentication
    3:15 App Store Review Guidelines
    3:47 Adding the Firebase Emulator
    5:06 Implementing the Sign in with Apple button
    6:56 Implementing handleSignInWithAppleRequest
    7:34 What's a nonce?
    8:56 Implementing handleSignInWithAppleCompletion
    11:05 Demo: Signing in with Apple
    11:54 Behind the scenes: inspecting the ID token
    12:41 Behind the scenes: verifying the nonce
    13:28 Assigning the user's full name from the Apple ID token
    15:30 Signing out
    15:52 Monitoring authentication state
    16:13 Where to go from here?
    Resources:
    Getting started with Firebase Auth for Apple platforms → goo.gle/3DDIlbk
    Firebase Authentication for Apple documentation → goo.gle/3WaLU07
    Firebase Console → goo.gle/3vPYq9K
    Getting started with Firebase on Apple platforms → goo.gle/3szkx2j
    App Store Review Guidelines → goo.gle/3SLjxmm
    Source code → goo.gle/3DDZ6mT
    Catch more Firebase Fundamentals → goo.gle/Firebase-Fundamentals
    Subscribe to Firebase → goo.gle/Firebase
    #FirebaseFundamentals
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 28

  • @herroic
    @herroic 15 วันที่ผ่านมา

    Just what I was looking for. Thanks Peter!

  • @chuyutao2588
    @chuyutao2588 ปีที่แล้ว +1

    I like those stickers on your laptop~

  • @radezzientertainment501
    @radezzientertainment501 ปีที่แล้ว +1

    thanks peter

  • @kalmicka
    @kalmicka ปีที่แล้ว +4

    Thanks @Peter for the great video! One thing I'd like to add. If you already did sign in once before and need the email when logging back in, you need to decode the idTokenString in order to get the email. This is because the email field from the appleIDCredential from ASAuthorizationAppleIDCredential is also not being populated when signing back in. Hope this helps someone :)

    • @MillicentOgutu-sp8le
      @MillicentOgutu-sp8le ปีที่แล้ว

      Thank you very much Sir am so happy with your gaiding me my GOD bless you so much with your Company

  • @bircansezgin3822
    @bircansezgin3822 ปีที่แล้ว

    how do you open the Firebase sim. pls

  • @Decatilinae
    @Decatilinae ปีที่แล้ว +1

    thanks for sharing this tutorial

  • @RatulSarna
    @RatulSarna 6 หลายเดือนก่อน

    The link to source code in description points to the wrong sample. Please fix.

  • @LukePighetti
    @LukePighetti ปีที่แล้ว +2

    Very rarely do I need a guide on wiring up the UI to Firebase code. What I really need is a guide showing which items in Apple Developer Console map to items in Firebase Console. The Firebase docs are woefully insufficient in this area. Especially once you start touching SIWA on web.

    • @PeterFriese
      @PeterFriese ปีที่แล้ว +1

      Thanks for the feedback, Luke. The Fundamentals videos are intended to be useful for as many developers as possible, so we try to find a balance between being beginner-friendly, and covering all the details. Showing how the consoles (both Firebase and Apple) look like is a challenge, as things change a lot in these areas, but I will definitely keep this in mind for the next version of this video!

  • @stilakid
    @stilakid 7 หลายเดือนก่อน

    Thank u for this amazing resource! I have a question: when deleting an account, do we need to revoke the authentication token as stated in the firebase and Apple docs? If not, why? I realize this wasn't done in this tutorial and that got me curious

    • @30guarino
      @30guarino 7 หลายเดือนก่อน

      he made just made a video about your comment 10 days ago!

  • @mycloudvip
    @mycloudvip ปีที่แล้ว +2

    Hi, do you have an iOS auth integration for the web using Firebase js SDK?

    • @PeterFriese
      @PeterFriese ปีที่แล้ว +2

      We do! Here are the docs: firebase.google.com/docs/auth/web/apple

  • @ethanmaxey8291
    @ethanmaxey8291 6 หลายเดือนก่อน

    Very helpful. One issue - in the "Profile View" initially it showed my name in the email form, then I deleted my account, signed in with apple, and now the field is blank. Is this expected?

    • @iLoveAppl3947
      @iLoveAppl3947 17 วันที่ผ่านมา +1

      Yeah. To reset that go to your iCloud account in your device, go to Sign-In& Security then go to Sign in with Apple and find your app. Click on stop sharing and now you'll need to relaunch a fresh install and you''ll have your name displayed again. Thank me later

  • @user-lv5yq8gk7g
    @user-lv5yq8gk7g 4 หลายเดือนก่อน

    Authentication error: - "Firebase: Error (auth/operation-not-allowed)." how to fix this

  • @alamgirkhan001
    @alamgirkhan001 ปีที่แล้ว +1

    Does sign in with apple required Apple Developers Account? I don't see "sign in with apple" in signing & capabilities in Xcode.

    • @santhoshVnair
      @santhoshVnair ปีที่แล้ว +5

      Yes, you need a paid Apple Developer Account.

  • @prairieln
    @prairieln ปีที่แล้ว +1

    Is Firebase free if only Firebase Auth is needed for the app? Some said it is free, others said no. I'm confused. Please advise. Much appreciated.

    • @PeterFriese
      @PeterFriese ปีที่แล้ว

      The only authentication method that is not free of cost is Phone Authentication (as sending SMS is costly), but other than that, Firebase Auth is free of cost. See the pricing overview here: firebase.google.com/pricing

  • @danielduggin2898
    @danielduggin2898 ปีที่แล้ว +2

    This was super helpful thanks! Also, is it possible to add google sign in to this demo? If so, how would I go about that? I am new to xcode so I am still learning how all of this works

    • @PeterFriese
      @PeterFriese ปีที่แล้ว +1

      It is - a video on adding Google Sign-In is in the pipeline and should be published soon!

    • @user-gw5ko1pn3b
      @user-gw5ko1pn3b ปีที่แล้ว

      @@PeterFriese Look forward to it! Thank you

    • @PeterFriese
      @PeterFriese ปีที่แล้ว

      We've just shipped the Google Sign-In for iOS video: th-cam.com/video/IzyOdKm0bWE/w-d-xo.html

  • @seccat
    @seccat ปีที่แล้ว

    Does the email in Firebase get updated if the Apple account gets transferred (Changing the email in your apple account)? The ASAuthorizationAppleIDProvider 's credentialState will equal .transferred