Use your own Client ID Oauth 2.0 for users to Login with Google in your promotions. This integration is useful when:
- You use your own domain in the promotion.
- You don't want to show Easypromos name when users Login with Google.
- You already have and already work with your own OAuth 2.0 Client ID
This is the warning message from Google when users try to login from your custom domain and you have not enabled the Google Oauth integration:
What do you need before starting?
Important note: We recommend this integration to be implemented by an agent with prior experience with OAuth integrations.
You will need to have these 3 URLs ready:
- Your terms and conditions URL: You can use the URL of your T&C of your promotion, or the URL to the general terms of your website or business.
- REDIRECT URI: This is the URL that you will need to introduce for the configuration of the Google Client ID. You can obtain this URL from the screen of the Google integration of your promotion:
The REDIRECT URI will always have the following format:
- If your custom domain is: https://promo.mydomain.com
- Then the REDIRECT URI is: https://promo.mydomain.com/utils/social/google
STEP BY STEP INSTRUCTIONS
1. Enable the API for your project:
To do so, open the API library in the Google API Console. You can enter from the following link: https://console.cloud.google.com/apis/library
2. Select an already existing project or create a new one:
3. Go to the "API and services" section:
4. Within API & services, go to Credentials > create credentials and select OAuth Client ID:
5. If you do not have a consent screen created yet, it will be necessary to configure one:
6. Select the “External to your organization” user type:
7. Next, fill in the form with the following information:
- Name of the application: name of the application to have it identified in the google console
- Support email: in case any user at the time of logging in has doubts about the following fields.
- Company logo: the logo that will be shown to users when they log in.
- Application Homepage: You can insert the URL of your business website or your promotion Custom Domain.
- Conditions URL: link to the terms and conditions of the application
- Authorised Domain: add the Custom Domain of your promotion
- Contact information: allow Google to notify if any important update is made on the console.
Save and continue.
8. You will then see the scopes and permissions and users for testing screens. You can leave them empty. Click on Save and Continue.
After finishing the configuration of the Oauth Consent Screen, the status of publishing is set as test. Although it says "Test", the Google integration will work correctly. It won't show your Application Name and your Logo. It will show only the URL of your custom domain in the Consent Screen. If you want to show your Logo and Name, you would need to pass a review process from Google which can takes about 3 - 5 Business days.
9. Once the consent screen has been created, enter the Credentials tab again and select OAuth Client ID. You will need to pick a type of application you want to create. Select the Web application option:
10. Insert your REDIRECT_URI in the Authorised redirect URIs:
Remember that you can obtain the REDIRECT_URI from the Integrations > Google screen in your promotion:
11. Confirm to create the application. You then obtain the Client ID and Client Secret data, which are the two fields that you will need to copy and paste to configure the Google Login in your promotion.
12. Go to the configuration of your promotion, enter the integrations section > Google Auth Login and paste the two fields with the information of your application created in google, which you obtained in the previous step.
How to Test your Google Integration
To test that your Google Integration works, participate into your promotion as a user, and ensure you are connecting from your custom domain.
If the Oauth Consent Screen from Google appears with a reference to your custom domain, means that your integration is correctly set: