Introduction


Google Login is a valuable feature that allows users to access your website conveniently, eliminating the need to create and remember additional passwords. By enabling this feature, you simplify the user experience, offering your visitors a secure and efficient way to log in using their Google accounts. This article provides a step-by-step guide to integrating Google Login with your eDirectory website. 


Steps to Configure Google Login


Step 1: Access the Google API Console

  1. Visit the Google API Console.
  2. Create a new project:
    • Click "Create Project" directly, or select "Select a project" > "New project". 

Step 2: Set Up Your Project

  1. Enter a name for your project, preferably your site's name, in the Project Name field. Leave the Location field as the default ("No organization"), and click "Create". 

Step 3: Configure Google login

  1. Once your project is created, select it from the dropdown menu at the top of the page.
  2. Click "OAuth consent screen" in the left-hand menu.
  3. Click "Get Started"
  4. Complete the following fields and click "Next":

    App Name:Your website's name.
    User Support Email: Your email address.

  5. Select the option "External", and click "Next"
  6. Type your email address and hit "Next"
  7. Make sure to check the box to agree to the terms, click on "Continue", and on "Create".
  8.   Click on the "Create OAuth Client" option.
  9.  Choose "Web application"
  10. Configure the following:
    • Application Type: Select "Web Application".
    • Name: Assign a name like "Google Login".
    • Authorized JavaScript Origins: Add your website's home page URL in these formats:
      • https://www.example.com
      • https://example.com
    • Redirect URLs: Add the extension  /sponsors/googleauth.php to your site URL. Follow the examples:
      • https://www.example.com/sponsors/googleauth.php
      • https://example.com/sponsors/googleauth.php
    • Click "Create" to finalize.


      Note: Replace “test” with your site domain.


      Notice: Ensure to have a live domain linked to your site before configuring Google login in your site. Contact the support team at [email protected] if you need a domain change or check out our instructional article to learn more: Domain Change: How can I proceed to change my domain?
  11. After creating your OAuth Client, click on the option "Google login"
  12. Copy both the Client ID and the Client Secret:
  13. Log in to your eDirectory Site Manager.
  14. Go to "Settings" > "Sign-in Options".
  15. Check the box to Enable sign in using Google, and paste the Client ID and Client Secret into their respective fields, then click "Save Changes".
  16. Now, back to your Google Cloud console, click on "Branding" 
  17. Complete the following fields:
    • App Name: Your website’s name.
    • User Support Email: Your email address.
    • Application Homepage: Link to your site’s homepage.
    • Privacy Policy URL: Link to your website's privacy policy.
    • Terms of Service URL: Link to your website's terms of service.
    • Authorized Domains: Click "Add Domain" and enter your domain without https or www (e.g., example.com).
    • Developer Contact Information: Your email address.

After filling in all fields, click "Save".


Note: Replace "testin the example links shown in the screenshot with your site's correct name.


Conclusion


Integrating Google Login with your eDirectory website enhances user convenience and security by allowing seamless authentication through Google accounts. By following the step-by-step guide outlined in this article, you can successfully configure Google Login, providing your visitors with an easy and efficient way to access your site.

Remember to ensure your domain is live before setting up Google Login and double-check all configurations to avoid issues. If you encounter any difficulties, don’t hesitate to reach out to our support team at [email protected]. With this feature enabled, you can improve user experience and streamline login processes on your platform.