Google Login
Seamlessly integrate Google OAuth 2.0 authentication into your Pocket Script application, allowing users to log in with their Google accounts. This guide walks you through the setup process, from creating a Google API project to configuring Pocket Script for a smooth “Login with Google” experience.
Overview
Integrating Google as an identity provider offers your users a convenient and secure way to access your Pocket Script application. This feature leverages Google’s OAuth 2.0 protocol, ensuring a streamlined authentication process while maintaining high security standards.
Before you begin, ensure you have admin access to your Pocket Script application and a Google account for setting up the OAuth integration.
Getting Google Client ID and Secret
-
Navigate to the
Credentials
tab -
Click
Select a project --> New Project
and then click the buttonCreate
OR if you’ve created a Firebase project while setting up the Pocket Android App, then you can select the existing project and skip to Step 6 -
Navigate to the tab OAuth consent screen
-
Enter the Application name, Authorized domains and click the button Save
-
Click the button
Create Credentials
and from the dropdown list selectOAuth client ID
-
From the Application type, select the
Web application
, enter Authorized JavaScript origins and click Create button-
Authorized JavaScript origins
Authorized JavaScript origins will be your website URL- Whether you install the script in the main domain or a subfolder, the final URL here will be your main domain. Enter your URL as:
- In case of a subdomain, enter your URL as:
- Whether you install the script in the main domain or a subfolder, the final URL here will be your main domain. Enter your URL as:
-
Authorized redirect URIs
For Authorized redirect URIs, appendadmin/controller/oauth.php
to your website URL- For the main domain install at example.com, enter your URL as:
- For sub-domain install at subdomain.example.com, enter your URL as
- For subfolder install at example.com/subfolder, enter your URL as
- For the main domain install at example.com, enter your URL as:
-
-
Copy your
Client ID
andSecret Key
Final Steps
Paste the copied keys in your admin panel by following the steps below
- Log in to your Admin Interface (Pocket script instance)
- Navigate to
Settings -> Configuration -> Web App Configuration
from the admin sidebar - Scroll down to the
Social Login
Section - And paste the copied
Google Client Id
andGoogle Secret Id
That’s it!
Need Help?
If you need any help or assistance, we’re here for you! Please reach out to our support team