How to Integrate Google Sign-In?
Last updated: 17/Apr/2022
First, visit the Google Developer Console to create a project:
After creating the project, make sure to select it. Then, navigate to the credentials page:
Click on "Create Credentials" and select "OAuth Client ID". Then, choose "Web Application" under the consent section.
You will receive a client ID and a client secret.
Log in to your cPanel (or any control panel) and go to the file manager. Locate the PROJECT-ROOT/.env
file and update it with the following values:
GOOGLE_ENABLE=on GOOGLE_CLIENT_ID=000000000000-XXXXXXXXXXX.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=XXXXXXXXXXXXX GOOGLE_REDIRECT=https://YOUR-DOMAIN.com/sign-in-with-google
Finally, add your domain URL to the Authorized redirect URIs box on the Google credentials page. The URL must end with /sign-in-with-google.
For example: https://YOUR-DOMAIN.com/sign-in-with-google