You should remove this method and change 

```
person_omniauth_authorize_path(@current_community ? @current_community.facebook_login_method(@current_host_with_port) : :facebook)
```

to

```
person_omniauth_authorize_path(:facebook)
```

And then you can also remove `@current_host_with_port = request.host_with_port`