Refactor passport logic into config file