The-Commit-Company / frappe-react-sdk

React hooks for Frappe
https://frappe-react.vercel.app
MIT License
107 stars 36 forks source link

Customer Portal - React Redirect #47

Closed tsmanagers closed 9 months ago

tsmanagers commented 9 months ago

We are developing a custom customer portal in React JS. Currently, customer is login into ERPNext then it will be redirected to the ERPNext customer portal; we wanted to redirect it to our custom portal. Can anyone help with how this can be done?

Through dropio app we can create new route like customer-portal but how we can integrate that route with ERPNext login feature so at the time of login our custom app will load instead of ERPNext customer portal

We are using ERPNext 14

nikkothari22 commented 9 months ago

You can either set the home page of your site to the React app or add a redirect from / to the path on which your React app is hosted. All of this can be done in Website Settings I guess.

tsmanagers commented 9 months ago

Is there any way that we can redirect the customer's user from the normal ERPNext login page to our custom portal? Basically user can do login from ERPNext login page and after login if its customer then it will redirect to our route if its system user then flow will be normal like it is there in ERPNext for desk access.

nikkothari22 commented 9 months ago

I think you can achieve this using the default home page in your roles.

tsmanagers commented 9 months ago

Thank you very much Nikhil sir for your help & support.