Enabling Customer Login with a Google Account
In addition to registering as a member using email, SHOPLINE also offers the option for customers to log in using their Google accounts, allowing them to quickly and easily register or log in to your store.
The one-click Google account login feature was developed by Google, and its implementation requires obtaining a client ID and client secret from Google Cloud. You need to complete the preliminary process on Google Cloud before returning to the SHOPLINE admin panel for configuration. Please be patient and follow the steps carefully as the setup process is quite long. If the screen doesn’t match the description or if any errors occur, take a screenshot and give it to our online consultant in the SHOPLINE admin panel for further assistance.
Step-by-step Guide
Enabling login with Google requires obtaining a client ID and client secret from Google Cloud, and then adding them to the SHOPLINE admin panel. Please follow the steps below:
- Obtain the client ID and client secret from Google Cloud. Open https://console.cloud.google.com and log in to your Google account.
- From the main panel, go to the project list on the upper left side of the screen and click CREATE PROJECT.
- Fill in the project name as well as choose a parent organization or folder for your project, and then click CREATE.
- Go to APIs & Services > OAuth consent screen > select External for User Type and click CREATE.
- The system will redirect you to the Edit app registration page, where you can enter the App name, User support email, and Developer contact information. Then, click SAVE AND CONTINUE at the bottom.
- (Optional) Add or remove the scopes in the Scopes page and click SAVE AND CONTINUE.
- (Optional) Add users to the Test users page and click SAVE AND CONTINUE.
- Complete the configuration in the Summary page and click BACK TO DASHBOARD.
- Go to Credentials > CREATE CREDENTIALS > OAuth client ID.
- Select Web application for Application type.
- Under Authorized JavaScript origins, enter the domain name under URLs. This is the URL of your store's admin panel.
-
Under Authorised redirect URIs, enter the URL(s) of your store’s login page. The required URL depends on whether you are using the Classic customer account, New customer account, or both.
Classic customer account
Append "/user/signIn" to your store domain. For example:
-
If your store domain is: https://abcd.myshopline.com
Your login URL will be: https://abcd.myshopline.com/user/signIn
-
If you use a custom domain: https://abcd.wxyz.com
Your login URL will be: https://abcd.wxyz.com/user/signIn
New customer account
Append "/account/signIn" to your store domain. For example:
-
If your store domain is: https://abcd.myshopline.com
Your login URL will be: https://abcd.myshopline.com/account/signIn
-
If you use a custom domain: https://abcd.wxyz.com
Your login URL will be: https://abcd.wxyz.com/account/signIn
If both Classic and New customer accounts are enabled
Enter both login URLs in the field, placing each URL on a separate line (use the Enter key to separate them).
Notes:
- The URLs above are examples only. Please make sure to replace them with your actual store URL. You may refer to your store’s homepage URL as a reference.
- If you see error 400: redirect_uri_mismatch, check if the redirect url you provided here matches the login link of your online store.
-
- Click on Create.
- Obtain the Client ID and Client Secret. The Client ID and Client Secret here correspond to the App ID and App Secret in the SHOPLINE admin panel pop-up window.
- Go to OAuth consent screen tab, and change the Publishing status to Published by clicking PUBLISH APP and click CONFIRM in the pop-up window.
-
After completing the above steps, your Client ID and Client Secret are set. Next, you need to fill in the Client ID and Client Secret obtained from Google into the SHOPLINE admin panel. From your SHOPLINE admin panel, go to Settings > Customer account > General settings > Login through social media, find the Google login option, and click Link.
-
In the pop-up window, enter the App ID and App Secret obtained from Google Cloud, choose whether to enable the login guide, and then click Save.
-
The Google login option will then display a Linked status. Based on your business needs, choose whether to enable third-party login for the Classic customer account, the New customer account, or both in the Account type section.
- Congrats, after completing the above steps, your customers can now log in to the store using their Google account.