Authentication
KMPStarterKit provides an easy setup for authentication using Firebase Authentication and the KMPAuth library. KMPStarterKit already supports multiple authentication providers, including Google and Apple, as well as functionality for getting the current user, logging out, and deleting a user. This section guides you through the necessary steps to configure user authentication in your application.
Setting Up Firebase Authentication
-
Create a Firebase Project:
- Navigate to the Firebase Console.
- Create a new project or select an existing one.
-
Enable Authentication Providers:
- In the Firebase console, go to the Authentication section.
- Click on the Sign-in method tab.
- Enable the desired authentication providers (e.g., Google, Apple) by enabling them on and providing any required configuration, such as OAuth credentials (more details are given in the following paragraph).
-
Add Configuration Files: After enabling desired sign-in methods, download firebase configuration file again.
- For Android, download the
google-services.jsonfile and place it in theandroidAppfolder of your project. - For iOS, download the
GoogleService-Info.plistfile and add it to theiosApp/iosAppfolder.
- For Android, download the