can i trigger login, i want redirect to other app when user login in frappe
example: when login by username = “test” will redirect to discus.frappe.io, and all other user will redirect to /app/ normaly
can i trigger login, i want redirect to other app when user login in frappe
example: when login by username = “test” will redirect to discus.frappe.io, and all other user will redirect to /app/ normaly
It is not easily possible, you have to change the whole logic structure.
I just want when the user’s name is “test” to switch to appdomain/insights, the rest remains the same
because the test user does not have permission to access the frappe app
Please check the reference:
can not redirect to /insights because i would not it access any doctype, just insights page
I am not sure, it worked or not, but try it yourself.
Use the on_login or on_session_creation trigger add those triger in hooks.py
and route to the new page
hooks.py
“version2_app.utils.user_check”
@frappe.whitelist()
def user_check()
if frappe.session.user == "Test:
frappe.local.response[“home_page”] = “discus.frappe.io”
else:
frappe.local.response[“home_page”] = "new route "