1. Home
  2. Tutorials
  3. Integrating Third Party Services
  4. Authenticate the User with Firebase

Authenticate the User with Firebase

login screen

If you use a Firebase backend, you can authenticate users in your Dropsource app. By sending an email address and password entered by your app user, you can log users in, sign them up, retrieve and send data related to their account with your Firebase service. To add Firebase user login to your app:

  1. If you haven’t already done so, set up your Firebase backend to accept user login. Open the project in your Firebase console and navigate to Authentication. In the Sign-In Method section, make sure Email/Password is enabled.

    firebase auth enabled

    You will be able to authenticate any users already registered with your Firebase project, as well as signing new users up via your Dropsource app.

    firebase users

    ⓘ Note

    Your Firebase and Dropsource app Package ID (Android) / Bundle ID (iOS) need to match:

    • You’ll find the Android Package ID in the Dropsource editor in Settings > Application.
    • Your iOS bundle ID is com.dropsourcetesting.your-project-id where your-project-id is the number in your Dropsource project URL immediately following project/.
  2. Download the Google Services JSON (Android) / PLIST (iOS) file for your Firebase app. Navigate to your Project settings.

    firebase project settings

    In the Your apps section, download the google-services.json / GoogleService-Info.plist file.

    firebase settings json

  3. Add your Firebase details to your Dropsource project. In Settings > Firebase, upload the JSON / PLIST file you downloaded from your Firebase project.

    firebase settings

    Any Firebase auth you carry out in the app will now be associated with the relevant Firebase project.

  4. Sign a user up or in to your app. Use the Sign in user with Firebase authentication Action to sign an existing user in, or the Sign up user with Firebase authentication Action to register a new user with your service, for example in the Tapped Event of a Button Element. Pass the user’s email address and password from Text Fields in your page.

    firebase signin

    • Use the nested Success and Failed Events to respond to sign in / sign up – if successful you can access data from the user account via the Event Data.

      firebase userid

      If sign in was unsuccessful you can retrieve the error message via the Event Data in the Failed Event.

Your Dropsource app can carry out additional Firebase account Actions including updating the user details and sending password reset emails. You can also log events in Firebase to track user behavior in your app using the Actions to create, add data to, and submit Firebase events, as well as adding any user properties you need for analytics.

Was this article helpful to you? Yes No

How can we help?