Help Center - Smaartr IO
All Categories Getting Started Setting-up Google Login

Setting-up Google Login

How to create a Google Cloud Project

Before we can enable a Google login for our academy, we need to set-up first a Google Cloud project.

If you already have a Google Cloud project, you may skip this section and proceed to the next one.

If not, then simply follow the instructions below for your first Google Cloud Project.

By creating a project, we will be able to get 2 things we need for this set-up, the Client ID and the Client Secret.

Step 1: Go to https://console.cloud.google.com/

Step 2: Login using your Gmail

Step 3: Create a Project

Click "Select Project" on the upper corner of the screen 👉 then click NEW PROJECT

image.png

Step 4: Provide Project name and then click "Create"

image.png


Set-up 0Auth Consent Screen

Now that we already have a Google Cloud project, the next step is to set-up our 0Auth Consent Screen.

On your project's dashboard, use the left side-bar menu and go to the ff:

Step 1: click APIs and Services 👉 0Auth consent screen

image.png

Step 2: Choose External and click Create

image.png

Step 3: Fully Configure the App Information

Once all required fields are configured, click "Save and Continue"

image.png

Step 4: Add Scopes

Add the following scopes:

  • userinfo.email

  • userinfo.profile

  • openid

After that, scroll the right side menu all the way down

image.png

Then click "Update"

image.png

After updating, you should see the summary of the added scopes

Click "Save and Continue"

image.png

Step 5: Add test users

image.png

After adding, click "Save and Continue"

image.png

Step 6: Review summary

After that, you should see the summary similar to the below screenshot.

image.png

Then click the "Back To Dashboard" button

Step 7: Publish your App

Click "Publish APP"

image.png

Then click "Confirm"

image.png


Creating Client ID and Client Secret

After we have full configured our 0Auth Consent Screen, it's time to create our Client ID and Client Token.

Step 1: Click Create Credentials 👉0Auth Client ID

image.png

Step 2: Configure your Client ID

  • Choose "Web Application" on the Application type

  • Add your Brand name

  • Under Authorized JavaScript origins, add your Academy URL

  • Under Authorized Redirect URIs, add this url

https://api.smaartr.io/v1/user/google_login_callback

After that click "Create"

image.png

Step 3: Copy the Client ID and Client Secret

image.png


Add the Client ID and Client Secret on your Smaartr IO Academy Settings:

Finally, add the Client ID and Client secret on your Academy settings

Then click Save

image.png

That's it!

If all things are followed, you should now have a working Google login for your Academy.

If you need further help, create a support ticket.