Google Login Integration for Themes
This documentation provides steps to integrate Google Login into the login.twig and signup.twig templates for Eternity Themes.
Requirements
-
Google Developer Console:
- A project needs to be set up in the Google Developer Console.
- Enable the "Google+ API" or "Google Identity" API.
- OAuth 2.0 credentials need to be created for web applications.
-
Backend Configuration:
- Ensure that the backend is configured to handle Google OAuth callbacks.
- The
google_login_activevariable should be set totruewhen Google Login is enabled. - The
google_login_urlshould be generated based on the OAuth flow. - Redirect google url will be
yourdomain.com/auth/google.
-
Theme Compatibility:
- Ensure that the theme supports the inclusion of the Google Login button.
- Check for any CSS conflicts and make adjustments as needed.
Integration Steps
-
Modify
login.twigandsignup.twigFilesAdd the following code snippet to the
login.twigandsignup.twigfiles. This will insert a Google Login button if Google Login is active:{% if google_login_active %} <div id="google_login"> <a href="{{google_login_url}}"> <img src="https://cdn.flashypanels.com/public/uploads/ffc2128f384865d4bf26640cd5a6278f0bddad5733e46c1b40133.png" height="40"> </a> </div> {% endif %}
Theme Specific Instructions
- For Eternity Themes

