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
- Visit the Google API Console.
- Create a new project:
- Click "Create Project" directly, or select "Select a project" > "New project".
Step 2: Set Up Your Project
- 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 the OAuth Consent Screen
- Once your project is created, select it from the dropdown menu at the top of the page.
- Click "OAuth consent screen" in the left-hand menu.
- Choose "External" as the user type, then click "Create".
- 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
orwww
(e.g.,example.com
). - Developer Contact Information: Your email address.
After filling in all fields, click "Save and continue".
Note: Replace "test" in the example links shown in the screenshot with your site's correct name.
Step 4: Create OAuth Client ID
- Navigate to "Credentials" in the left-hand menu and click "Create Credentials" > "OAuth Client ID".
- 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 these URLs for the login callback:
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 support@edirectory.com 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?
Step 5: Retrieve API Credentials
- A popup will display your Client ID and Client Secret. Copy both credentials for use in the next step.
Step 6: Configure Google Login in eDirectory
- Log in to your eDirectory Site Manager.
- Go to "Settings" > "Sign-in Options".
- Check the box to Enable sign in using Google.
- Paste the Client ID and Client Secret into their respective fields, then click "Save Changes".
Conclusion
With Google Login successfully configured, your visitors can now log in securely and conveniently using their Google accounts. Following these steps ensures seamless integration and enhances the user experience on your website. If you encounter any issues or have additional questions, contact our support team at support@edirectory.com.