Skip to content

Enables Google external login setup for Virto Commerce Platform and Frontend

License

Notifications You must be signed in to change notification settings

VirtoCommerce/vc-module-google-sso

Repository files navigation

Google Single Sign-On

Google Single Sign-On (SSO) is a module that provides users with a simplified sign-in experience. It allows users to access multiple applications with a single set of credentials, eliminating the need to remember different usernames and passwords for each application.

The Google SSO module integrates Virto Commerce with Google to provide secure authentication and authorization for cloud and on-premises applications. This helps to improve productivity, security, and user satisfaction by reducing the number of times users are prompted for their credentials.

Key features

  • The Google SSO module can be integrated with both the Virto Commerce Platform and the Frontend Application

image image image

Setup

Create Google OAuth 2.0 Client

To use Google APIs in an application with OAuth 2.0, you need authorization credentials that identify the app for Google's OAuth 2.0 server. Your applications will be able to use these credentials to access APIs that you have enabled for that project.

To create credentials for your project:

  1. Go to Google API & Services.
  2. Create a new project and open the dashboard.
  3. In the OAuth consent screen of the dashboard:
    • Select User Type → External and click CREATE.
    • In the App Information dialogue, type the app name, user support email, and developer contact information.
    • Skip Scopes.
    • Skip Test users.
    • Review the OAuth consent screen and return to the app dashboard.
    • In the Credentials tab of the app dashboard, select CREATE CREDENTIALS > OAuth client ID.
  4. Select Application type → Web application and choose a name.
  5. In the Authorized redirect URIs section, select ADD URI to set the redirect URI (https://{host}/signin-google). Run the platform using the HTTPS scheme. Otherwise, the SSO won't work.

Note: If your platform runs on a local machine, put https://localhost:10645/signin-google.

  1. Click CREATE.
  2. Save Client ID and Client Secret to use them in the module.

Configure Google sign-in

Store Google Client ID, secret values and other sensitive settings in KeyVault Storage. In our example, we use the appsettings.json configuration file. Add the following section to the configuration:

"GoogleSSO": {
    "Enabled": true,
    "ApplicationId": "<your Client ID>",
    "Secret": "<your Client Secret>"
}

Enable Google for Virto Commerce Frontend

  1. Go to Virto Commerce Platform, Stores, select a store
  2. Click Authentication widget and activate Google sign-in for the store.
  3. Add store URL to the list of authorized redirect URIs (https://{store-host}/signin-google).

image

Documentation

References

License

Copyright (c) Virto Solutions LTD. All rights reserved.

This software is licensed under the Virto Commerce Open Software License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://virtocommerce.com/opensourcelicense.

Unless required by the applicable law or agreed to in written form, the software distributed under the License is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

About

Enables Google external login setup for Virto Commerce Platform and Frontend

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages