Mantis MUI React
v3.5.0
v3.5.0
  • Documentation
  • Pre-requisites
  • Quick Start
  • Package
  • Folder Structure
  • State Management
  • Internationalization
  • Authentication
    • Switch to Auth0
    • Switch to Firebase
    • Switch to AWS Cognito
    • Switch to Supabase
  • Axios API Calls
  • Routing
  • Project Configuration
  • Color Presets
  • Theme/Style Configuration
  • How to
    • Login as First Page
    • Dashboard as First Page
    • Render Menu from the backend
    • Remove menu render from Backend
    • Remove Authentication
      • Vite
      • NextJS
  • Figma
  • Integration
    • Seed
    • To Existing Project
    • Comparison
  • Components
    • Avatar
    • BreadCrumb
    • Button
    • Dot
    • Main Card
    • Progress
    • SnackBar
    • Tooltip
    • Transitions
  • Dependencies
  • Roadmap
  • Support
  • Changelog
  • Mantis Eco System
  • FAQ
Powered by GitBook
On this page
  1. Authentication

Switch to Supabase

PreviousSwitch to AWS CognitoNextAxios API Calls

NextJs Uses next-auth as authentication so no docs provided here

JWT to Supabase

  1. Set AWS Config

At present, AWS uses a dummy config, so we don't need to change anything, but in actual implementation, you need to set poolId and appClientId in the following file. For more detail refer to supabase here:

.env
...

## Supabase

VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=

...
  1. Change Config

src\config.js
export const APP_AUTH: AuthProvider = AuthProvider.SUPABASE;
  1. Change AuthProvider

Comment another provider in the following file and uncomment thety Supabase one.

src/App.tsx
import { SupabseProvider as AuthProvider } from 'contexts/SupabaseContext';
  1. Change Auth Hooks

Comment another context in the following file and uncomment the Supabase one.

src/hooks/useAuth.ts
import AuthContext from 'contexts/SupabaseContext';

JWT to Supabase

  1. Set AWS Config

.env
...

## Supabase

VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=

...
  1. Change Config

src\config.js
export const APP_AUTH: AuthProvider = AuthProvider.SUPABASE;
  1. Change AuthProvider

Comment another provider in the following file and uncomment thety Supabase one.

src/App.jsx
import { SupabseProvider as AuthProvider } from 'contexts/SupabaseContext';
  1. Change Auth Hooks

Comment another context in the following file and uncomment the Supabase one.

src/hooks/useAuth.js
import AuthContext from 'contexts/SupabaseContext';

At present, AWS uses a dummy config, so we don't need to change anything, but in actual implementation, you need to set poolId and appClientId in the following file. For more detail refer to supabase here:

https://supabase.com/
https://supabase.com/