My app was working just fine and I could easily log in with facebook, but today, facebook login suddenly gave me this error message:
"Facebook has detected Superhero Maker isn't using a secure connection to transfer information. Until Superhero Maker updates its security settings, you won't be able to use Facebook to log into it". After I closed the error message, I got this error message as well: "The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."
I did not make any changes to my code, so I'm not sure what's going on. Also, the `FACEBOOK_ID` and `FACEBOOK_SECRET` match the app ID and app Secret from Facebook.

routes.rb

```
Rails.application.routes.draw do
  get 'auth/:provider/callback', to: 'sessions#facebookAuth'
  get 'auth/failure', to: redirect('/')
end

```

omniauth.rb

```
Rails.application.config.middleware.use OmniAuth::Builder do
  provider :facebook, ENV['FACEBOOK_ID'], ENV['FACEBOOK_SECRET']
end

```

.env

```
FACEBOOK_ID=[facebook_id_here]
FACEBOOK_SECRET=[facebook_secret_here]

```

sessions\_controller.rb

```
class SessionsController < ApplicationController

def facebookAuth

    access_token = request.env["omniauth.auth"]
    @user = User.from_omniauth(access_token)  
    @user.facebook_token = access_token.credentials.token  
    refresh_token = access_token.credentials.refresh_token
    @user.facebook_refresh_token = refresh_token if refresh_token.present?

    if @user.save
        log_in(@user)
        redirect_to user_path(@user)
    else
        redirect_to login_path
    end
  end   
end

```

Facebook Login Setting
[screenshot](https://i.stack.imgur.com/OuWZU.png)