dzaki236/secure-google-provider

Package for solving error login socialite

1.5 2025-05-10 14:39 UTC

This package is auto-updated.

Last update: 2025-06-10 14:40:46 UTC


README

Announcement from google โœ๏ธ

Since 2025 at february google announcement some policy for oAuth certs, even if you used it for production and https scheme, you need 'certs' for more secure in oAuth v2.

Sadly, Socialite package cannot provide to handle some secure certs ASAP.

I got you guys ๐Ÿ™Œ

Have you got error like curl error 60: SSL certificate problem: unable to get local issuer certificate (see https:...??, it means you have to secure your oAuth for google services.

By using this package, you don't have to waste your time, take it easy, i got you..

Installation ๐Ÿ“Œ

Requirement :

  • Php^8.0
  • Laravel 8+ (even better using laravel 10+)
  • Socialite package (Any version with php ^8.0 compatiblity)

Step Installation ๐Ÿ“

$ composer require dzaki236/secure-google-provider

Or you can choose specific version by :

$ composer require dzaki236/secure-google-provider:^1.0

So.. How to use?๐Ÿค”

Well... in your controller or where you put your logic in laravel, you can find or make like this part :

Socialite::driver('google')->redirect();

Don't forget to add some namespacing at controller or logic file :

use Laravel\Socialite\Facades\Socialite;

But.. you still got error when you use google at parameter on driver function, you need to change it, from google to secure-google.

By this example :

Socialite::driver('secure-google')->redirect(); // For redirect, you will redirect to page oAuth by google services

To get user info after oAuth login state closed :

$social_user = Socialite::driver('secure-google')->user(); // For redirect, you will redirect to page oAuth by google services

Aditional Information (Optional Part) ๐Ÿ’ก

Add this part on your config/services.php, and you can forcing verify, you don't need cert for a while oAuth state is process

    ....
    'google' => [
        ....
        // Start from this part :
        'verify' => [
            'force' => false
        ],
        // End part
    ],
];

Warningโš ๏ธ : Add and edit only google part, even you try to add this verify part outside, it won't effect anything.

Credits

License

The MIT License (MIT). Please see License File for more information.