Social Login with Firebase
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide covers how to set up a login page in Bravo using Firebase as the user management service. where users log in with their existing Google/Apple accounts.
Here is a sample design file that already contain all the necessary tags for the Social logins (Google and Apple). This can also be combined in the same file with email and password login or phone login in case you want to provide all the options.
Apple login is only supported on iOS devices.
Use the tags below to set up Google and Apple login:
[action:login:firebase-google]
: Performs the Google login action, needs to be added in the Google login button.
[action:login:firebase-apple]
: Performs the Apple login action, needs to be added in the Apple login button. Note that Apple login will only work on iOS devices.
[ignore:android]
: As Apple login is not supported on Android devices, it is recommended to hide the Apple login button there, to provide a good user experience. This tag will hide the UI element attached to it on Android devices.
Social logins will only work on the final apps (test or released), not in Bravo Vision.
For phone and social logins, there's no signup page - the login action will also create new accounts for first-time users.
Once you have the UI ready, it's time to manage user authentication in your existing Firebase project.
After the project is created, click on Project Overview from the left menu and then select Authentication. Here is where your user accounts will be created and stored.
Go to Sign-in method tab, click on Add new provider to activate the Google and/or Apple sign-in.
Select your desired provider and toggle the Enable button to activate.
Complete the required Public-facing name and Support email fields for project-
Finally, click Save.
To activate the Social login (Google and Apple), you may complete the following:
Go to Bravo Studio, select your app and go to Integrations > Login > Enable Firebase > Activate Social Login.
Follow the steps below to see how to configure them in Firebase:
Here are the steps to follow if you want to get the configuration files for Bravo Vision:
If you don't have any app created in Firebase yet, follow the next steps as you need to create new Firebase configuration files to upload them to Bravo Studio.
Scroll down to Your apps section and click Add app.
Choose a platform (iOS or Android) and do the following depending on the platform:
Go to Project Overview (from the left menu), click the iOS symbol.
In step 1, fill in the iOS Bundle ID for Bravo Vision: com.codelesslabs.app
Leave the rest blank, and click Register app.
In step 2, download the file GoogleService-Info.plist and click, Next to continue.
The rest of the steps are not needed, so click Next for Steps 3 and 4.
To finish, in Step 5, click Continue to the console.
To verify that the app has been created, go to your Project Overview > General > Your apps.
Once having the Firebase configuration files, go back to Bravo Studio, open the App project that has the login (or import your design file if you haven't yet) and click on the Integrations tab.
Navigate to the Login option in the left-hand sidebar and Enable the Firebase toggle.
Once enabled, the Bravo Vision tab will be selected by default. Click on the Configure button to upload the Firebase files in the corresponding fields. It is also possible to do so from Firebase Config.
After uploading the files, do not forget to Save the changes. You must have a green check in order for that integration to work correctly on that platform you're setting up. If you're not setting up Firebase in a certain platform, you can ignore the warning icon.
Your app is ready to test! Open Bravo Vision to test out the login pages.
Once you are ready to publish your app to the stores, you need to create new Firebase configuration files with the final bundle ID (for iOS) and package name (for Android) and upload them to Bravo Studio.
If you don't have any app created in Firebase yet, follow the next steps as you need to create new Firebase configuration files with the final bundle ID (for iOS) and package name (for Android) and upload them to Bravo Studio. Otherwise, add the missing params we mention:
Scroll down to Your apps section and click Add app.
Select a platform: iOS or Android.
Register the app and do the following depending on the platform:
Where do I find the final Bundle ID (for iOS)?
Additionally on iOS, you also need to set up Apple login in your Developer Console.
Review the existing identifiers or appID for your app.
Locate and select “Sign In with Apple” from the list.
Save the changes.
Check if your profile(s) are now marked as invalid.
Edit the invalid profile(s) by adding the new identifier or mobileprovisions.
Save the updated profile.
Finally, request a new build of your app using the recently updated profile with the new identifier.
3.2.2. Upload the Firebase Config files in Bravo
Once having the Firebase configuration files, go back to Bravo Studio, select the App > Integrations tab > Firebase Config.
Under "Activate Firebase services for final app", upload the Firebase files in the corresponding fields and do not forget to Save the changes.
Firebase integration has been updated in this app. Please request a new build and upload a new version to ensure your published app continues to work properly.
In case you already have a published app bundle, and you change these Firebase assets, you'll need to generate a new bundle and publish an update to the stores.
If you haven't created your Firebase project yet, follow the steps provided .
Now, you need to obtain the Firebase configuration files (GoogleService-Info.plist for iOS and google-services.json for Android) and upload them to Bravo. The purpose of this configuration file is to create a link between our app and this Firebase project. So, if in the future, you want to connect to another Firebase project, you can do it by uploading a new Firebase configuration file in Bravo for each mobile platform (iOS and Android). Depending on your needs, you can either: - (recommended for prototyping and testing) - (recommended for publishers)
After the user has logged in, a will be created: ${user.id}
.
This built-in variable can be sent as part of an API request, to handle user-specific data in the database.
Enter your Bundle ID
and App Store ID
. Remember you need to complete to have these parameters ready.
When you have the necessary files for publication, use the same Bundle ID from the Bravo publication form for the final Firebase file. (Check how to on the app publication process)
Log in to your Apple Developer account at .
Visit .
Obtain the second SHA-1 code for the published app version, which can only be obtained from Google Play. In order to get this code, you need to submit your app to first, and have it approved by Google Play. Copy the SHA-1 code from the section indicated below.
Once completed, your app's login is ready to test! Open Bravo Vision or your Published app to test out the login pages.