Skip to content

Enabling Google Login

ExoHome supports Sign in with Google function as default for users logging into the ExoHome app with Google accounts. Please follow the settings and provide the final results to Exosite. We'll assist you with the rest. If you prefer not to provide this login method to the users, please inform Exosite to turn off the related cloud settings.

Prerequisite

  • Google developer account
  • Firebase developer account
  • Release/debug Keystore file generated for building the Android App

Requirements

To enable Google login, you must create a project in Firebase Console and Google Cloud Console. Please make sure the follow settings are completed before you start building your apps:

Setup in Firebase Console

Steps to Create a Firebase Project

  1. Go to Firebase Console and create a project. Skip this step if you already created one for push notification.

  2. Click into All Products from the side menu and choose Authentication.

  3. In the Sign-in method tab, click Google and enable the service. Click Save.

  4. You will be able to see the Web client ID and Web client secrete after clicking save button. Please copy the info and provide it to Exosite team.

Add iOS APP (skip if you have setup push notification before)

  1. Go to Project settings and scroll down to the buttom. Create an iOS app by clicking the icon.

  2. Download GoogleService-Info.plist file and copy it to the ExoHome project root folder before you start to build the iOS App.

Add Android APP

  1. You should create Android debug/release keystore file(s) and put them in the hamv_mobile/keystore folder.

  2. Open the terminal and cd to the keystore folder. Run the following command to generate SHA-1 fingerprint certificate. Copy it and save for later settings.

    Debug:

    keytool -keystore debug.keystore -list -v
    

    Release:

    keytool -keystore release.keystore -list -v
    

  3. Go to Project settings and scroll to the buttom. Create an Android app by clicking the icon (skip this step if you already setup push notification before).

    Note

    Register the app without filling "Debug signing certificate SHA-1" and keep clicking Next button to the filnal step.

  4. Find your Android App and click Add fingerprint. Paste the SHA-1 you generated in step 2 and save.

  5. Download the google-services.json file and copy it to the ExoHome project root folder.

Note

If you have previously set up push notification, please download the new google-services.json file and overwrite the old one.

Setup in Google Cloud Console

Steps

  1. Go to Google Cloud Console, where you will also find the project you just created in Firebase. Please choose this project and go to the next step.

  2. Open side menu and go to APIs and ServicesCredentials. Click into Web client under OAuth 2.0 IDs.

  3. Add the following URIs and save.

    • Authorized JavaScript origins: https://<your-domain>.apps.exosite.io
    • Authorized redirect URIs: https://<your-domain>.apps.exosite.io/api:1/social/handle/Google

  4. Go to OAuth consent screen on the side menu. Click EDIT APP and fill the required fields.

  5. Keeps clicking SAVE AND CONTINUE to the final step. Then click SAVE FOR VARIFICATION.

  6. Please check that the Publishing status should be In production and the User type should be External.

Update Your App Project

Steps

  1. Open package.json under project root.
  2. Add "@awesome-cordova-plugins/firebase-x": "^6.8.0" under "dependencies" part.

  3. Add "cordova-plugin-firebasex": "16.4.0" under "devDependencies" part.

  4. Add the following under "cordova" —> "plugins"

        "cordova-plugin-firebasex": {
            "IOS_STRIP_DEBUG": "true",
            "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
            "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
            "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
            "FIREBASE_FCM_AUTOINIT_ENABLED": "true"
          }
    

  5. Open app.config.ts file, under ~/src/app/. Modify the signinMethod value to true.


Have more questions? Submit a request