https://github.com/leowebguy/google-oauth
https://github.com/leowebguy/google-oauth
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/leowebguy/google-oauth
- Owner: leowebguy
- License: other
- Created: 2026-05-13T00:42:15.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-13T23:20:28.000Z (about 1 month ago)
- Last Synced: 2026-05-13T23:35:44.700Z (about 1 month ago)
- Language: PHP
- Size: 293 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Google OAuth plugin for Craft
A minimal Craft plugin to provide Google OAuth login
---
## Installation
```bash
composer require "leowebguy/google-oauth" -w && php craft plugin/install google-oauth
```
## Composer
Craft 4
```json
"require": {
"leowebguy/google-oauth": "^1.0",
}
```
Craft 5
```json
"require": {
"leowebguy/google-oauth": "^2.0",
}
```
## Credentials
Gather the necessary info from GoogleOAuth
Go to https://console.cloud.google.com/auth/clients
1. Select a Project
2. Create client
3. Pick "Web application"

4. Give it a name
5. Add "Authorized JavaScript origins" i.e. https://myapp.ddev.site (Optional)
6. Add "Authorized redirect URIs" i.e. https://myapp.ddev.site/oauth/g/auth
> The URI has to be "/oauth/g/auth"
> Added to your Craft App URL i.e. https://myapp.ddev.site/oauth/g/auth

7. Copy Client ID and Secret
8. Paste/Save /admin/settings/plugins/google-oauth

9. Add ID/Secret to .env (Optional)
```.dotenv
### OAUTH
GOOGLE_CLIENT_ID=111-xxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=AAA-123qwe
```

