PHPackages                             hoanghiep/auth-google - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. hoanghiep/auth-google

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

hoanghiep/auth-google
=====================

dang nhap bang tai khoan google

08PHP

Since Jul 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/thandonguocmo2020/laravel-auth-google)[ Packagist](https://packagist.org/packages/hoanghiep/auth-google)[ RSS](/packages/hoanghiep-auth-google/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-auth-google
===================

[](#laravel-auth-google)

1. Thêm mới routes vào file routes.php
======================================

[](#1-thêm-mới-routes-vào-file-routesphp)

- Khởi tạo provider file
- khởi tạo file routes.php trong gói chưa kèm nội dung
- Khởi tạo file provider class đăng ký gói :

thêm routes.php vào laravel qua method boot :

if (! $this-&gt;app-&gt;routesAreCached()) { require **DIR**.'/routes.php'; }

2. Khởi tạo file cấu hình với mảng cần thêm vào cấu hình có sắn ví dụ :
=======================================================================

[](#2-khởi-tạo-file-cấu-hình-với-mảng-cần-thêm-vào-cấu-hình-có-sắn-ví-dụ-)

 \[ 'driver' =&gt; 'local', 'root' =&gt; app\_path('/'), 'visibility' =&gt; 'public', \] \]; # 3. Thêm cấu hình vào file cấu hình laravel trong method register với key của file config : public function register() { $this-&gt;mergeConfigFrom( \_\_DIR\_\_.'/config/filesystems.php', 'filesystems.disks' ); } # 4. Thêm tuyến đường mới vào file routes.php của app/Http/routes.php bằng cách viết trong route của gói Route::get('hoanghiep/add-routes',function(){ if(Storage::disk('h3')-&gt;exists("Http/routes.php")){ Storage::disk("h3")-&gt;append('Http/routes.php', 'Route::get(\\'auth/google\\',\["middleware"=&gt;"web", "uses"=&gt; \\'Auth\\GoogleController@redirectToProvider\\'\]); '); Storage::disk("h3")-&gt;append('Http/routes.php', 'Route::get(\\'auth/google/callback\\', \["middleware"=&gt;"web","uses"=&gt; \\'Auth\\GoogleController@handleProviderCallback\\'\]); '); } }); // sau khi chạy url hoanghiep/add-routes này đoạn lệnh sẽ kiểm tra file routes.php đã tồn tại trong app/Http/routes.php vào thực hiện thêm mới 2 route 'auth/google - auth/google/callback\\ vào file đó. # 5. Tạo file controller xử lý 2 file đó. Trong provider class tại method boot() thêm đoạn sau : $this-&gt;publishes(\[ \_\_DIR\_\_.("/Auth/GoogleController.php")=&gt; app\_path("/Http/Controllers/Auth/GoogleController.php"), \]) Chạy lệnh để xuất bản file controller : php artisan vendor:publish Như vậy khi chạy lệnh controller sẽ được tạo ra. thêm file cấu hình của google bằng cách tạo ra một file trong gói vừa tải tên là service.php trong đó chứa : \[ 'client\_id' =&gt; '15561597118-vv58u5dtkm10uni08kv471ltjb1od40m.apps.googleusercontent.com', 'client\_secret' =&gt; '\_1Ojx13UdmPMkTadUrClA9Cw', 'redirect' =&gt; 'http://localhost/laravel/auth/google/callback', \] \]; sau đó thêm đoạn code này vào provider : $this-&gt;mergeConfigFrom( \_\_DIR\_\_.'/config/services.php', 'services' ); Như vậy là đã gộp file cấu hình vào file config thành công kiểm tra kết quả bằng cách vào method boot hoặc route chạy đoạn dd(config('services')); hoặc dd(config('services.google')); + Để tùy chỉnh thông tin của serve google bạn vào file 'services' trong package/config/services.php + Để chạy thử tính năng : bạn chạy 2 url auth/google và auth/google/callback nếu url ko tồn tại thì chạy url để khởi tạo url đó : hoanghiep/add-routes

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8016818?v=4)[thandonguocmo2020](/maintainers/thandonguocmo2020)[@thandonguocmo2020](https://github.com/thandonguocmo2020)

---

Top Contributors

[![thandonguocmo2020](https://avatars.githubusercontent.com/u/8016818?v=4)](https://github.com/thandonguocmo2020 "thandonguocmo2020 (4 commits)")

### Embed Badge

![Health badge](/badges/hoanghiep-auth-google/health.svg)

```
[![Health](https://phpackages.com/badges/hoanghiep-auth-google/health.svg)](https://phpackages.com/packages/hoanghiep-auth-google)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)[firemultimedia/mautic-multi-captcha-bundle

This plugin brings Google's reCAPTCHA, hCaptcha, and Cloudflare Turnstile integration to mautic.

151.4k](/packages/firemultimedia-mautic-multi-captcha-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
