Search code examples
iosfirebasefirebase-authenticationfirebaseuiapple-sign-in

Is it really necessary to have custom implementation for 'Sign-in with Apple' on Firebase on iOS?


My final goal is to have Sign-in with Apple for authentication.

While reading the documentation from here and here I couldn't figure out why a simple call is not enough...

Using directly [FUIOAuth appleAuthProvider] works as expected (login successfully, creates record in the DB with the new ID). For the sole purpose of the authentication, is it still necessary to do the long implementation?

Thank you in advance.


Solution

  • There are two ways to use Firebase Authentication in your app:

    1. Use the raw Firebase Authentication APIs, and provide your own UI around them.
    2. Use FirebaseUI (specifically the AuthUI module in there), which builds a standardized UI around the APIs.

    Neither of these is pertinently better than the other, it all depends on the needs of your app, and your experience level.

    If you don't yet know where to start, I'd recommend to always start with FirebaseUI, as it saves you a lot of time. And since it's built on top of the raw Firebase Authentication API, you can always switch to that later if needed.