Knowledge Base

Upgrading from v1.x to v2.0

This guide covers upgrading the Google Login Plugin from v1.x to v2.0.

Version 2.0 is a breaking change release. Please read all sections before upgrading.


What Changed

Authentication Flow

v1.x v2.0
Google Identity Services (GSI) JavaScript widget OAuth 2.0 Authorization Code + PKCE
Client-side credential POST to Blesta Server-side token exchange with Google
Nonce-based CSRF protection State parameter + PKCE
Popup/One Tap sign-in Redirect-based sign-in

The new flow is more secure and not dependent on Google's JavaScript SDK, which was deprecated.

PHP Requirement

v1.x supported PHP 7.4+. v2.0 requires PHP 8.2 or later.

Google Cloud Console Change Required

The redirect URI must be updated. This is a required step.

v1.x v2.0
JavaScript origins required Redirect URIs required
https://your-domain.com/cp/plugin/google_login/ https://your-domain.com/cp/plugin/google_login/

The path is the same but must be listed under Authorised redirect URIs in Google Cloud Console.


Upgrade Steps

1. Verify PHP Version

Confirm your server is running PHP 8.2 or later:

php -v

2. Note Your Credentials

Note your existing Client ID and Client Secret from the plugin settings page.

3. Replace Plugin Files

  1. Download the v2.0 plugin from your FXRM account
  2. Delete the existing google_login/ folder from your Blesta plugins directory
  3. Upload the new google_login/ folder in its place

4. Run the Database Migration

In your Blesta admin panel, go to Settings → Company → Plugins and click Upgrade next to the plugin. This automatically widens the client_id column to 256 characters and secret to 128 characters.

5. Update Google Cloud Console

  1. Go to Google Cloud Console → Credentials
  2. Open your OAuth 2.0 Client ID
  3. Confirm this URL is under Authorised redirect URIs:
    https://your-domain.com/cp/plugin/google_login/
  4. Save changes

6. Test

Open an incognito browser and test the Google login flow.


What Was Removed

  • Google Identity Services JavaScript SDK
  • Client-side credential submission
  • Nonce generation and validation
  • One Tap automatic sign-in
  • ionCube encoding
Please rate this article to help us improve our Knowledge Base.

0 0