Using Firebase to sign in using Google
A social login is a method of authentication where the authentication is delegated to a trustworthy social networking service outside our app. A common social networking service that offers this kind of opportunity is Google.
In this recipe, you'll learn how to integrate a social login with Google using Firebase.
Getting ready
First, we need to create a SwiftUI app called FirebaseGoogleLoginApp
with Xcode.
If it's not already installed on your computer, install Cocoapods. See the previous recipe to learn how to do this.
In the Firebase console, create a project called FirebaseGoogleLoginApp
, remembering to disable Google Analytics.
Then, add the Bundle ID of the iOS app to the Firebase project, generate the GoogleService-Info.plist
file, and add it to the Xcode project.
Firebase Configuration
In this recipe, we will assume you are already familiar with the Firebase console and how to install Cocoapods.
If this...