This page describes how to remove auth from a theme
Disable Authentication Temporary
Disabling authentication temporarily is generally not recommended due to security risks. However, if you have a specific scenario where you need to disable authentication for a short period, here are some steps you can follow:
Comment out the AuthGuard wrapper for the routes within the MainLayout element:
MainRoutes.tsx
// import AuthGuard from 'utils/route-guard/AuthGuard';......element: (// <AuthGuard><MainLayout />// </AuthGuard>),......
In the code snippet above, the <AuthGuard> component is commented out, allowing the routes within the MainLayout component to be rendered without authentication protection. To enable the AuthGuard wrapper again, remove the comment markers (//) surrounding the <AuthGuard> component.
Remove Authentication Permanent
If you want to permanently remove authentication from a system or application, here are the steps to follow:
Remove below authentication keys from .env file.
.env
......## Firebase - Google Auth REACT_APP_FIREBASE_API_KEY=REACT_APP_FIREBASE_AUTH_DOMAIN=REACT_APP_FIREBASE_PROJECT_ID=REACT_APP_FIREBASE_STORAGE_BUCKET=REACT_APP_FIREBASE_MESSAGING_SENDER_ID=REACT_APP_FIREBASE_APP_ID=REACT_APP_FIREBASE_MEASUREMENT_ID=## AWSREACT_APP_AWS_POOL_ID=REACT_APP_AWS_APP_CLIENT_ID=## Auth0REACT_APP_AUTH0_CLIENT_ID=REACT_APP_AUTH0_DOMAIN=......
Removed below list of files and directory.
mantis-material-react..├── src│ ├── components\cards │ │ ├── AuthFooter.tsx│ ├── context│ │ ├── Auth0Context.tsx│ │ ├── AWSCognitoContext.tsx│ │ ├── FirebaseContext.tsx│ │ ├── JWTContext.tsx│ ├── hooks│ │ ├── useAuth.ts│ ├── pages│ │ ├── auth (remove directory with all sub files)│ ├── routes│ │ ├── LoginRoutes.tsx│ ├── sections│ │ ├── auth (remove directory with all sub files)│ ├── utils│ │ ├── route-guard (remove directory with all sub files)
Remove LoginRoutes - Open file ./src/routes/index.tsx, and remove LoginRoutes import.