Configure Google Login

How to set up Google Sign-In. To make life easier for your users, they can use Google to create an account in your marketplace.

Sharetribe avatar
Written by Sharetribe
Updated over a week ago

Note that the following instructions only apply to Sharetribe marketplaces.

In your Sharetribe marketplace, users can create a user account and log in using their Google account. When using their Google credentials, users don't need to remember a separate username and password for your marketplace based on Sharetribe. Their profile picture is automatically imported from Google. 

If you want to, you can also enable the same feature for Facebook Login and LinkedIn Sign In.
 
 If you would like to enable that feature, you will need to create a Google Sign-In Project and configure your marketplace to use this Project. Creating a Google Sign-In Project is free. Follow the instructions below to set this up. 

IMPORTANT! Google's interface is subject to change and makes part of this step by step instructions confusing. If you notice that you cannot follow these steps, please contact Sharetribe's Support team, and we will be happy to assist.

When creating a Google Sign-In Project for your marketplace, please do NOT add anything that is not specifically indicated in these instructions. Doing so might create some issues and prevent you from finishing the setup.

Create and set up a Google Sign-In Project

  1. Log in with your Google account (you may have to register as a developer if you don't have a Google developers account already).

  2. Click the "Select a project" button on the top bar. If you already have projects, the button will display one of your project's names.

  3. When the pop-up opens, click the "New project" button on the top right corner.

  4. Name your Project (for example, your marketplace name) and click "Create".

  5. You have now created your project. Now you need to configure it ;)

  6. Go to the "OAuth consent screen" page. You can do so from many links on the page, but the easiest way is from the left side menu.

  7. Once there, select "External" as a User type and click "Create".

  8. You can skip most of the fields on this next page, but you should add at least the name of your app that will be displayed to your members. Your marketplace name is a good name for this. Click "Save".
    Important note: Adding a logo/icon will make things nicer for your users however this triggers a review process from Google. You would then have to verify your domain, a process that can only be achieved with the custom domain feature, available on the Pro plan (or above). The review also takes a few business days, from Google's side. All in all, when you're starting, we recommend not to add any logo/icon, to make things easier at first. Later on, you will always be able to add more details to your Google Login setup.

  9. Ignore Scope and Test users step. In the Summary step, click "Back to Dashboard".

  10. From the left sidebar, go to the "Credentials" page.

  11. Click "+ Create credentials" from the top of the page.

  12. Select "OAuth 2.0 Client ID"

  13. The application type is "Web application"

  14. You can give it any name

  15. In "Authorized JavaScript origins", add your full marketplace's URL with https and possibly www or the subdomain, without the trailing slash:
    - If you are on a Pro/Growth/Scale plan, it could be: https://www.example.com, https://example.com, or https://something.example.com.
    - If you are on a trial, Starter or Hobby plan, it could be https://example.sharetribe.com

  16. In the "Authorized redirect URIs", add your marketplace address followed by /people/auth/google_oauth2/callback
    - If you are on a Pro/Growth/Scale plan, it could be: https://www.example.com/people/auth/google_oauth2/callback or https://something.example.com/people/auth/google_oauth2/callback
    - If you are on a trial, Starter, or Hobby plan, it could be: https://example.sharetribe.com/people/auth/google_oauth2/callback

  17. Click "Create".

Your Google Sign-In project is now created, configured, and live. But this isn't finished yet!
You now have to configure it in your marketplace to use it.

Configure your Google Sign-In Project in your marketplace

You'll have to copy some information about your Google Sign-In Projet from Google to use it within your marketplace. If you haven't created a Google Sign-In Project at Google yet, please follow the instructions above.

  1. From the top bar, make sure to select the Project you've just created.

  2. From the left sidebar, go to "Credentials".

  3. In the "OAuth 2.0 client IDs" list, click on the row for the ID you created.

  4. Copy the value in "Client ID". It's a long chain of characters and numbers.

  5. Log in to your marketplace. You must be logged as an administrator.

  6. Go to the "Users / Signup & Login" page of your Admin panel.

  7. Find the "Google Sign-In" section.

  8. In "Google Client ID", paste the value "Client ID" you copied earlier.

  9. Go back to your Project at Google, in the same section you were.

  10. Copy the value in "Client secret". It's a long chain of characters and numbers. You may have to refresh the page to have that "Client secret" field displayed.

  11. Go back to the "Users / Signup & Login / Google Sign-In" section of your Admin panel.

  12. Paste the copied "Client secret" string into the "Google Client secret" field.

  13. Click "Save settings".

That's it! Google Sign-In is now active and set!

Did this answer your question?