SaasAble Documentation
Admin - V1.2.0
Admin - V1.2.0
  • Getting started
    • Prerequisites
    • Setup
    • Deployment
  • Development
    • Guards
      • Auth Guard
      • Guest Guard
      • Role Guard
    • Folder Structure
    • Routing
    • Menu
    • Env Variables
    • API Calls
    • Dependencies
    • Auth
      • Supabase
      • AWS
    • How to
      • Change Logo
      • Skip Login
  • Theming
    • Color
    • Typography
    • Icons
  • Global
    • Config
    • Styles
    • Component Overrides
Powered by GitBook
On this page
  1. Development
  2. Guards

Auth Guard

An Auth Guard protects specific pages by ensuring only authenticated users can access them.

Auth Guard is configured at src/utils/route-guard/AuthGuard.tsx To use it, just wrap the component with AuthGuard, same as below.

<AuthProvider>
    <AuthGuard>
        ...
        <YourReactComponent />
        ...
    </AuthGuard>
</AuthProvider>
PreviousGuardsNextGuest Guard