score:8
based on a comment on the github issue, i ended up implementing a workaround based on the simple example.
the main thing i did was to add a few custom routes with the nolayout option. these custom routes do not seem to go through authentication for some reason i could not find in the documentation.
so, i redefined my app.js file:
const app = () => (
<admin
loginpage={login}
authprovider={authprovider}
dataprovider={dataprovider}
i18nprovider={i18nprovider}
title="example admin"
locale="en"
customreducers={{ tree }}
customroutes={[
<route exact path="/forgotpassword" component={forgotpassword} nolayout/>,
<route exact path="/resetpassword" component={resetpassword} nolayout/>,
]}
>
{permissions => [
<resource name="users" {...users} />,
]}
</admin>
);
anyways, this is the solution i came up with, not sure if it is the right one. please let me know if you find something better.
score:0
i'm also using a solution like this.
but i can't use notify
when adding nolayout
.
do you have using notify
with
<route exact path="/forgotpassword" component={forgotpassword} nolayout/>
score:2
i had a similar issue and adding custom route with nolayout
option still sent me to the login screen.
it turned out not to be the checkauth
part of the authprovider
causing this.
the cause was getpermissions
part of the authprovider
under the condition where permissions could not be found i had:
return promise.reject();
changing this to: return promise.resolve([]);
solved it for me.
Source: stackoverflow.com
Related Query
- How to implement forgot password page on react-admin
- How to implement the OAuth2 Authorization code grant with PKCE for a React single page application?
- How to properly implement React Transition Group for Page Transitions
- I have express on backend and react on frontend, but i also have admin page working on pug template, how can i run it on one domain
- How to show my reset password page in React using Django Rest Framework and Dj-rest-auth
- How to implement authenticated routes in React Router 4?
- How to create multiple page app using react
- React Hooks - How do I implement shouldComponentUpdate?
- How to implement pagination in React
- How to implement Error Boundary with React Hooks Component
- On React Router, how to stay logged in state even page refresh?
- how to navigate from one page to another in react js?
- How to implement radio button in React Native
- React | How to detect Page Refresh (F5)
- How to hide navbar in login page in react router
- How to Implement dynamic routing in routes.js for generated menu items in sidebar in universal react redux boilerplate by erikras
- How to implement service(concept in AngularJS) -like component in React
- How to implement Role based restrictions/permissions in react redux app?
- How to implement skipWaiting with Create React App?
- How can we implement componentWillUnmount using react hooks?
- How to get iOS 12 Autofill to ask to save password in React Native app?
- How to implement long polling for React + axios
- How to implement multiple checkbox using react hook
- How to implement Stripe with React Native?
- How to implement componentDidMount with hooks in React to be in line with the EsLint rule "react-hooks/exhaustive-deps": "warn"?
- How to reload a page (state) in a react app
- How to use Apollo Client + React Router to implement private routes and redirection based on user status?
- how can I show customized error messaged from server side validation in React Admin package?
- How to implement scroll restoration for React Router SPA
- How to stream webcam feed on web page using react js component?
More Query from same tag
- How to do setState inside callback: ReactJS
- React, how to access child's state from parent? no need to update parent's state
- Making scrollable div in CSS
- Passing a second argument through onSubmit in forms using react and EmailJs
- How to save or cache a Component's html?
- Learning React and using componentDidMount causes an error
- How to use javascript in react component
- React - How to stay on the same page even if it was refreshed?
- In Redux, when do I need to use .bind(this)
- Adding Bootstrap to ReactJS
- Toggle one element in React.js onClick
- React Native tool to track re-renders visually?
- webpack-dev-server not recompiling (JS files AND SCSS files)
- Problems with the fetch api on React.js
- how to check if the user is authorize to access page based on its role
- Reading response header in onError in Apollo React
- If else in react.js(basic)
- Enzyme shallow dive fails with connected component
- Jest how to check spy function being called within a spy function?
- Mapping objects to get inner object values
- How do I stop a component rendering before data is fetched?
- Destructure JS object with similar children
- How to open a file chooser inside a function
- setState not updating font awesome icon
- React hooks useState Array
- how can i use application/ld+json in nextjs
- Use props from component in another file
- ESLint configuration with typescript jsx
- having difficulty in understanding as where to keep the Routes in nested routes and passing all the props to that route
- How to override Bootstrap theme colors in bootstrapped react/redux app?