alfadocs-google-workspace-auth

Restrict AlfaDocs app sign-in to @alfadocs.com Google Workspace accounts via Supabase Auth.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/alfadocs/ai-harness-instructions --skill alfadocs-google-workspace-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: alfadocs-google-workspace-auth
Source: https://github.com/alfadocs/ai-harness-instructions/tree/main/lovable/skills/alfadocs-google-workspace-auth
Command: npx skills add https://github.com/alfadocs/ai-harness-instructions --skill alfadocs-google-workspace-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It sets up secure employee authentication for internal AlfaDocs apps, ensuring only staff with @alfadocs.com Google Workspace accounts can sign in through Supabase Auth.

Core Features & Use Cases

  • Workspace-only access: Use Google as the identity provider while keeping access restricted to the company domain.
  • Defense-in-depth enforcement: Combine Google consent-screen internal access, server-side domain checks, and RLS policies keyed to email or role claims.
  • Protected staff app flows: Cover login screens, auth callbacks, route guards, and app data access for internal tools.
  • Use case: An AlfaDocs operations dashboard needs employee-only login, no customer accounts, and strict server-enforced access control.

Quick Start

Implement an internal AlfaDocs staff sign-in flow with Google Workspace and Supabase Auth, then enforce @alfadocs.com access on the server and in row-level security.

Frequently Asked Questions about alfadocs-google-workspace-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restrict Supabase Auth login to a specific Google Workspace domain?

To restrict Supabase Auth login to a specific Google Workspace domain, you must configure the Google OAuth provider for internal access, enforce server-side domain checks on email claims, and apply Supabase row-level security policies.

What is the best way to secure internal staff authentication with Google Workspace and Supabase?

The best way to secure internal staff authentication is combining Google OAuth internal consent screens, server-side email domain enforcement, and Supabase RLS policies based on email or role claims to protect employee-facing app routes and data.

Can I use Supabase row-level security to block non-employee Google accounts from accessing app data?

Yes, you can use Supabase row-level security to block non-employee accounts by writing RLS policies that key off authenticated email claims, ensuring only authorized company domain users can query protected data.

How do I set up route guards for a Supabase OAuth callback handling internal domain users?

Set up route guards by validating the authenticated user's email domain during the Supabase OAuth callback, blocking access on the server side if the email does not match the required company domain before redirecting to protected app areas.

Do I need to configure internal OAuth consent to prevent external users from logging into my staff app?

Yes, configuring the Google OAuth consent screen for internal access is a required defense-in-depth measure to prevent external users from logging in, working alongside server-side domain checks and RLS policies.

Why does my Google Workspace domain restriction fail during Supabase staff login?

Google Workspace domain restriction fails during Supabase staff login if the OAuth consent screen is public, server-side email domain checks are missing, or RLS policies do not properly filter access based on the returned email claims.