Skip Login
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 file below:
src/routes/MainRoutes.tsx
// import AuthGuard from 'utils/route-guard/AuthGuard';
...
...
const MainRoutes = {
path: '/',
element: (
// <AuthGuard>
<MainLayout />
// </AuthGuard>
),
...
}In the code snippet above, the <AuthGuard> a 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 below from
.envfile.
Removed below list of files and directories.
Remove LoginRoutes and AuthenticationRoutes-
Open file src/routes/index.tsx, and remove LoginRoutes, AuthenticationRoutes import.
Remove or change
/loginroutes.If you want to remove routes, remove the router component
RouterLinkorLinkwithto=''props.If you want to change url, set the home page URL like,
to={DASHBOARD_PATH}, And importDASHBOARD_PATHfromconfigfile.
Remove
useAuthhook - Remove the below imports from throughout the project and set static values for user profile props.
Remove the axios interceptors response from the ./src/utils/axios.ts file. So the final version should look like below:
Remove import of
JWTProviderfrom ./src/App.tsxRemove import and usage of
AuthGuardfrom./src/routes/MainRoutes.tsx
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. The file below
file belowDisable 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 file below:
src/routes/MainRoutes.jsx
In the code snippet above, the <AuthGuard> a 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 below from
.envfile.
Removed below list of files and directories.
Remove LoginRoutes and AuthenticationRoutes-
Open file src/routes/index.jsx, and remove LoginRoutes, AuthenticationRoutes import.
, Remove or change
/loginroutes.If you want to remove routes, remove the router component
RouterLinkorLinkwithto=''props.If you want to change url, set the home page URL as, and
to={DASHBOARD_PATH}importDASHBOARD_PATHfromconfigfile.
Remove
useAuthhook - Remove the below imports from throughout the project and set static values for user profile props.
Remove Axios interceptors response from the ./src/utils/axios.ts file. So the final version should look like the below:
Remove import of
JWTProviderfrom ./src/App.jsxRemove import and usage of
AuthGuardfrom./src/routes/MainRoutes.jsx
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.
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
AuthGuardwrapper for the routes within theDashboardLayoutelement:
In the code snippet above, the <AuthGuard> a 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 below from
.envfile.
Removed below list of files and directories.
Remove
useAuthhook - Remove the below imports from throughout the project and set static values for user profile props.
Remove import of
JWTProviderfrom ./src/store/ProviderWrapper.tsxRemove import and usage of
AuthGuardfrom ./src/app/(dashboard)/layout.tsx
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.
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
AuthGuardwrapper for the routes within theDashboardLayoutelement:
In the code snippet above, the <AuthGuard> a 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 below from
.envfile.
Removed below list of files and directories.
Remove
useAuthhook - Remove the below imports from throughout the project and set static values for user profile props.
Remove import of
JWTProviderfrom ./src/store/ProviderWrapper.tsxRemove import and usage of
AuthGuardfrom ./src/app/(dashboard)/layout.tsx
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.
Last updated
Was this helpful?