I have a web form with settings Login Required, Apply Document Permissions. It’s working good. Based upon the role am changing the home page. I added a hook in on_session_creation
on_session_creation = [ "frappe.utils.custom.member_route_redirect" ] import frappe def member_route_redirect(): rolename=frappe.get_roles(frappe.session.user) print(rolename) if (rolename=="*******"): member=frappe.db.get_list('Member') print(member) frappe.local.response["home_page"] = "/abcd/"+member.name
It’s doing a good job. When I connect with a username and password, I get redirected to a specific member abcd/1234 ( The default route is /app), however social login (Google) doesn’t work. User Type is System User. During social login, the method method_route_redirect() is not invoked. I also tried auth_hooks, but it didn’t work.