Skip to main content

Authentication & Authorization

Switchyard uses a hybrid authentication approach combining the Switchyard framework with Supabase Auth, providing enterprise-grade security with Role-Based Access Control (RBAC).

Architecture Overview

Key Components

Authentication Flows

Standard Login (Admin UI)

1

Enter Credentials

User enters email and password in the login form
2

Supabase Validates

Frontend calls Supabase Auth API which validates credentials and returns a JWT
3

Switchyard Session

Frontend calls Switchyard auth endpoint with the Supabase token, which creates a session
4

Authenticated Requests

Subsequent requests include the session cookie automatically

Bearer Token (API/Mobile)

For programmatic access:

Service Account (Robots/Scripts)

For automated systems:

Environment Variables

Actor Types

The system supports multiple actor types:

Next Steps

RBAC System

Learn about roles and permissions

Service Accounts

Set up automated system access