DEV Community

Cover image for Vue Supabase Auth with Protected Routes
mmvergara
mmvergara

Posted on

Vue Supabase Auth with Protected Routes

Pretty much a barebones minimal template to get you started with authentication and protected routes.

🌐 App Demo

Features

  • 🚀 Protected Routes
  • 🚀 Supabase Session Object in Global via useAuthStore
  • 🚀 User Authentication
  • 🚀 Routing and Route Guards
  • 🚀 Minimal

It's also blazingly fast 🔥 No really, try it out for yourself.

Getting Started

  1. Clone the repository
  2. Install dependencies: npm install
  3. Create .env using the .env.example as a template
VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=
Enter fullscreen mode Exit fullscreen mode
  1. Run the app: npm run dev

Files you need to see so you can understand how it works.

  • src/stores/auth.ts
  • src/router/index.ts
  • All Pages

GitHub logo mmvergara / vue-supabase-auth-starter-template

Vue Supabase Auth Starter Template with Protected Routes

Vue Supabase Auth with Protected Routes

🌐 App Demo

Features

  • 🚀 Protected Routes
  • 🚀 Supabase Session Object in Global via useAuthStore
  • 🚀 User Authentication
  • 🚀 Routing and Route Guards
  • 🚀 Minimal

It's also blazingly fast 🔥 No really, try it out for yourself.

Getting Started

  1. Clone the repository
  2. Install dependencies: npm install
  3. Create .env using the .env.example as a template
VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=
  1. Run the app: npm run dev

Files you need to see so you can understand how it works.

  • src/stores/auth.ts
  • src/router/index.ts
  • All Pages





We also have a similar template for FIREBASE 🔥

Top comments (0)