uilibrary / matx-react

Matx -Free and open-source React Material UI Admin Dashboard Template
https://ui-lib.com/downloads/matx-react-dashboard
MIT License
925 stars 389 forks source link

I want to remove your authentication and level of access, can you help me? #21

Closed civil-dude closed 1 year ago

civil-dude commented 3 years ago

Hi, I want to add my custom authentication with server but How can I remove all authentication and level access system. I want to every logged user to access the dashboard.... Thanks

mh-rafi commented 3 years ago

Access control is not enabled by default, you dont need to use roles like this https://github.com/uilibrary/matx-react/blob/master/src/app/views/dashboard/DashboardRoutes.js#L8

You may need to update the api url for login and register https://github.com/uilibrary/matx-react/blob/master/src/app/contexts/JWTAuthContext.js#L88 https://github.com/uilibrary/matx-react/blob/master/src/app/contexts/JWTAuthContext.js#L105

civil-dude commented 2 years ago

and what if I only need dashboard, don't need authentication this time.... please help!

mh-rafi commented 2 years ago

It will be better if you enable role based access control, as you don't need role, just use one role for every user. add that role to all routes where you need authentication.

How to enable role auth, follow the comments in this file https://github.com/uilibrary/matx-react/blob/master/src/app/auth/AuthGuard.jsx

How to add role to route http://demos.ui-lib.com/matx-react-doc/routing.html#authGuard

civil-dude commented 2 years ago

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of Router.Consumer.

When using react-create-app , I try to add JSX :(, .

mh-rafi commented 2 years ago

Where and when it is producing the error? Please share screenshots or a screen record video.

civil-dude commented 2 years ago

when i am writing jsx components in react app. Do i have to add eslint scripts?

mh-rafi commented 2 years ago

This is not eslint issue. Maybe you are doing something wrong