score:8

Accepted answer

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.


Related Query

More Query from same tag