I\'m using the built-in authentication for users where User model has a polymorphic relationship(using typeable_type = App\\Model\\Doctor and typeable_id) with Doctor model.