Skip to main content
All CollectionsAdvancedSocial Logins
How to enable Google login
How to enable Google login

Learn how to create API credentials that would allow your users to use their Google accounts to access your marketplace.

Luis Rodriguez avatar
Written by Luis Rodriguez
Updated over 7 months ago

The process of Google Sign-in in your marketplace is really straightforward, however, there are several technical-looking steps that you need to complete before this is ready. If you follow all the steps you should be able to complete this without any issue.

Note: Google's interface is subject to change. If you encounter any inconsistencies with this step-by-step guide, please contact Sharetribe's Support team and we will be happy to assist.

In order to configure Google Sign-in in your marketplace, you need to do two things:

  1. Create a Google Cloud development project

  2. Connect that project to your marketplace through Console.

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 developer account already).

  2. Click the "Select a project" button on the top bar.

    1. If you already have a project, the selector will display the name of your project.

  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. Go to the "OAuth consent screen" page e.g. from the left side menu.

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

  7. Fill in the required fields:

    1. You need to add the App name and user support email for your app and the developer contact info (you should use your own email).

    2. You can add an App logo, App's home page, privacy policy and terms of service links, but these are not mandatory (if you had a logo, you will have to go through an extra verification step when publishing).

    3. Add your domain as an "Authorized domain" (just the domain without https://)

    4. Add your email as the "Developer contact information".

    5. Click "Save and continue"

    6. There isn't anything to add to "Scopes", so you can just click "Save and continue".

    7. There isn't anything to add to "Test users", so you can just click "Save and continue".

    8. Review things in "Summary" then click "Back to dashboard".

  8. From the left sidebar go to the "Credentials" page.

  9. Click "+ Create credentials" from the top of the page and select "OAuth Client ID".

  10. In "Application type", choose "Web application". You can give it any name.

  11. Under "Authorized JavaScript origins", click "ADD URI" and add your complete marketplace's URL with https and possibly www or the subdomain, without the trailing slash, e.g. "https://www.example.com", "https://example.com", or "https://something.example.com".

  12. Under the "Authorized redirect URIs", click "ADD URI" and add your marketplace address as you added it above, but followed by /api/auth/google/callback. e.g "https://www.example.com/api/auth/google/callback".

  13. Click "Create".

    1. Take note of the values of your Client ID and Client Secret, you will need them to connect this app to your marketplace (if you close the modal, you can find them later).

  14. Go back to "OAuth consent screen" and click "PUBLISH APP" under Publishing status and confirm.

Some helpful screenshots in case you get stuck.


Step 3 - Select a project

Step 6 - Go to the "OAuth consent screen" link

Steps 9 and 10 - Credentials

Steps 12-15 - Create OAuth client ID

Connect the Google Sign-In project to your marketplace

  1. Click "+ Add a new client"

  2. As the client name, type "Google Sign in".

  3. As an identity provider choose "Google"

  4. Add the Client ID and Client secret as noted in step 15 when creating the app.

    1. If you forgot to take a note you can find them again by going to Google Cloud Console > Credentials > OAuth 2.0 Client IDs and clicking the app name

  5. Click "Add client"

  6. That's it!

Where to find the Client ID and Secret

Test it out

You should make sure that things work by testing your signup and login process with Google.

Did this answer your question?