Cannot Hot Link to Private Routes After Authentication

Using demo 1 React version, after login and at the main dashboard page if I select a bookmark or paste in a url to a protected page it redirect to the auth page? That should not be by design. Is there a bug right now?

Text formatting options
Submit

Replies (2)

It's because the accessToken is undefined from your auth API

Yes, it is a bug, this accessToken is undefined since the variable name in files Registration.tsx and Login.tsx doesn't match the actual name from the API.

We will include a fix in the upcoming Metronic v8.0.34 release.

Now as a temporary solution you can update the following files:
1)src/app/modules/auth/models/AuthModel.ts, replace accessToken property with access_token.
2)Update src/app/modules/auth/components/Registration.tsx and src/app/modules/auth/components/Login.tsx, in onSubmit function accessToken variable must be access_token as well.

Text formatting options
Submit
Text formatting options
Submit