Download the PHP package centivadev/filament-google-workspace-auth without Composer

On this page you can find all versions of the php package centivadev/filament-google-workspace-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-google-workspace-auth

Filament Google Workspace Auth

Google Workspace (OIDC) authentication for Filament v4/v5 using a dedicated FilamentUser model and Spatie roles/permissions.

Features

Requirements

Installation

Publish config + migrations:

Install Spatie permissions (migrations + config):

Google Cloud Console Setup

  1. Create or select a Google Cloud Project
  2. Configure OAuth Consent Screen
    • Type: Internal (Workspace only)
    • Add your Workspace domain (mydomain.com)
    • Add scopes: openid, email, profile
  3. Create OAuth Client ID
    • Type: Web application
    • Authorized redirect URI:
      • https://YOUR-FILAMENT-DOMAIN/auth/google/callback
      • Example: https://admin.mydomain.com/auth/google/callback
  4. Copy the Client ID and Client Secret into your .env

Filament Panel Setup

Enable the plugin and remove password-based features from your panel provider:

Remove ->passwordReset() and ->emailVerification() from your panel provider to keep the login 100% Google.

FilamentUser model

Add the required traits and fields:

Make sure the filament guard exists in config/auth.php and that filament-users provider uses the FilamentUser model.

Configuration

The published config file lives at:

Key options:

Admin UI

The plugin registers three resources (configurable):

They are grouped under the navigation group configured in resources.navigation_group.

Protected roles:

Base permissions:

Authorization:

Session Validity

The package provides two independent mechanisms to ensure sessions stay in sync with Google Workspace.

Remember me

Controls whether a persistent cookie is issued after login. When false (default), the session ends when the browser is closed.

Absolute session lifetime

Forces the user to re-authenticate with Google after a fixed delay, regardless of activity.

This is independent from Laravel's native SESSION_LIFETIME (config/session.php). Both apply simultaneously — the one that triggers first wins:

Setting Type Resets on activity?
Laravel SESSION_LIFETIME Idle timeout Yes — extends on every request
FILAMENT_GOOGLE_SESSION_LIFETIME Absolute timeout No — fixed since login

Example: SESSION_LIFETIME=120 (2h idle) + FILAMENT_GOOGLE_SESSION_LIFETIME=480 (8h absolute). A user active all day is kicked out after 8 hours. An idle user is kicked out after 2 hours.

Important: When FILAMENT_GOOGLE_REMEMBER=true, the remember-me cookie bypasses Laravel's SESSION_LIFETIME entirely. In that case, FILAMENT_GOOGLE_SESSION_LIFETIME is the only timeout enforced.

Google account revocation detection

Periodically calls the Google OpenID Connect UserInfo endpoint (https://openidconnect.googleapis.com/v1/userinfo) to verify the user's account is still active. If the account has been deleted or suspended in Google Workspace, the user is logged out immediately.

The check uses the access_token stored in the session (valid for 60 minutes after login). After that window, session_lifetime acts as the safety net.

Timeline:

Network errors when calling the UserInfo endpoint are ignored (fail open) to avoid disrupting legitimate users during transient Google outages.

Notes

Testing

Tests are fully offline: Google endpoints are mocked, no real credentials are required.


All versions of filament-google-workspace-auth with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0 || ^5.0
firebase/php-jwt Version ^7.0
spatie/laravel-permission Version ^6.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package centivadev/filament-google-workspace-auth contains the following files

Loading the files please wait ...