NextJS
This page describes how to remove auth for NextJS
Mantis uses the next-auth for the authentication system.
Remove Authentication Permanent
If you want to permanently remove authentication for nextJS, here are the steps to follow:
Remove below authentication keys from
.envfile.
...
...
## Next Auth
NEXT_PUBLIC_AUTH_URL=
## NEXT_PUBLIC_AUTH_URL=
NEXT_PUBLIC_NEXTAUTH_SECRET=
## Auth0
REACT_APP_AUTH0_CLIENT_ID=
REACT_APP_AUTH0_CLIENT_SECRET=
REACT_APP_AUTH0_DOMAIN=
## Cognito
REACT_APP_COGNITO_CLIENT_ID=
REACT_APP_COGNITO_CLIENT_SECRET=
REACT_APP_COGNITO_REGION=
REACT_APP_COGNITO_POOL_ID=
REACT_APP_COGNITO_DOMAIN=
## JWT
## for 1 day - 86400 = 1* 24 * 60 * 60
REACT_APP_JWT_TIMEOUT=
REACT_APP_JWT_SECRET=
...
...Remove the below list of files and directories.
Remove the following lines from a file
src\app\ProviderWrapper.tsx
Remove the following lines from a file
src\app(dashboard)\layout.tsx
Remove the following lines from a file:
src/layout/DashboardLayout/index.tsx
Remove and change the following lines from a file
src\hooks\useUser.ts
Remove the following lines from the file - src\layout\DashboardLayout\Drawer\DrawerContent\NavUser.tsx
Remove the following lines from the file
src\layout\DashboardLayout\Header\HeaderContent\Profile\index.tsx
remove props handleLogout from file
src\layout\DashboardLayout\Header\HeaderContent\Profile\ProfileTab.tsx
Remove the following lines from a file
src\menu-items\pages.tsx
Remove the following lines from a file
src\utils\axios.ts
Remove package
"next-auth": "^**.**.**"from filepackage.json, removemode_modulesand install node again.
Disabling authentication within the system would render certain applications non-functional, particularly those reliant on backend APIs. These applications require a valid token to access and load data seamlessly.
Mantis uses the next-auth for the authentication system.
Remove Authentication Permanent
If you want to permanently remove authentication for nextJS, here are the steps to follow:
Remove below authentication keys from
.envfile.
Remove the below list of files and directories.
Remove the following lines from a file
src\app\ProviderWrapper.jsx
Remove the following lines from a file
src\app(dashboard)\layout.jsx
Remove the following lines from a file:
src/layout/DashboardLayout/index.jsx
Remove and change the following lines from a file
src\hooks\useUser.js
Remove the following lines from the file - src\layout\DashboardLayout\Drawer\DrawerContent\NavUser.jsx
Remove the following lines from the file
src\layout\DashboardLayout\Header\HeaderContent\Profile\index.jsx
remove props handleLogout from file
src\layout\DashboardLayout\Header\HeaderContent\Profile\ProfileTab.jsx
Remove the following lines from a file
src\menu-items\pages.jsx
Remove the following lines from a file
src\utils\axios.js
Remove package
"next-auth": "^**.**.**"from filepackage.json, removemode_modulesand install node again.
Disabling authentication within the system would render certain applications non-functional, particularly those reliant on backend APIs. These applications require a valid token to access and load data seamlessly.