If you want to permanently remove authentication for nextJS, here are the steps to follow:
Remove below authentication keys from .env file.
.env
......## Next AuthNEXTAUTH_URL=## NEXTAUTH_URL=NEXTAUTH_SECRET_KEY=## Auth0REACT_APP_AUTH0_CLIENT_ID=REACT_APP_AUTH0_CLIENT_SECRET=REACT_APP_AUTH0_DOMAIN=## CognitoREACT_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*60REACT_APP_JWT_TIMEOUT=REACT_APP_JWT_SECRET=......
Remove below authentication keys from next.config.js file.
mantis-material-react-next..├── src│ ├── app │ │ ├── api│ │ │ ├── auth (remove directory with all sub files)│ │ ├── (auth) (remove directory with all sub files) │ │ ├── pages│ │ │ ├── check-mail (remove directory with all sub files)│ │ │ ├── forget-pass (remove directory with all sub files)│ │ │ ├── login (remove directory with all sub files)│ │ │ ├── register (remove directory with all sub files)│ │ │ ├── reset-pass (remove directory with all sub files)│ ├── sections│ │ ├── auth (remove directory with all sub files and folder)│ ├── utils│ │ ├── route-guard (remove directory with all sub files)│ ├── views│ │ ├── auth (remove directory with all sub files)│ ├── types│ │ ├── auth.ts│ │ ├── next-auth.d.ts│ ├──utils│ │ ├── route-guard (remove directory with all sub files)
Remove following lines from filesrc\app\ProviderWrapper.tsx
Remove package"next-auth": "^**.**.**"from filepackage.json, remove mode_modules and 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.