leowebguy/google-oauth

A minimal Craft plugin to provide Google OAuth login

Maintainers

Package info

github.com/leowebguy/google-oauth

Type:craft-plugin

pkg:composer/leowebguy/google-oauth

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0 2026-05-15 15:06 UTC

This package is auto-updated.

Last update: 2026-05-15 15:06:50 UTC


README

A minimal Craft plugin to provide Google OAuth login

Installation

composer require "leowebguy/google-oauth" -w && php craft plugin/install google-oauth

Composer

Craft 4

"require": {
   "leowebguy/google-oauth": "^1.0",
}

Craft 5

"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"

Screenshot

  1. Give it a name
  2. Add "Authorized JavaScript origins" i.e. https://myapp.ddev.site (Optional)
  3. 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

Screenshot

  1. Copy Client ID and Secret
  2. Paste/Save /admin/settings/plugins/google-oauth

Screenshot

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

Screenshot

Screenshot