'Facebook login : Cannot load URL error coming when requesting access token from code?

I am implementing Facebook login and I was successful to do so. The app worked great for a month but for the past 2-3 days I am getting the error message "Cannot load URL: The domain of this URL does not include the domain of the application. To be able to load this URL, add all domains and subdomains of your application to the Application Domain field in your application settings" when I try to make call for an access token from code. The app is a server-side nodejs app currently in development so I don't have any domain yet.

Access Token call (used to work perfectly before few days)

const { data } = await axios({
            url: "https://graph.facebook.com/v12.0/oauth/access_token",
            method: "GET",
            params: {
                client_id: keys.APP_ID_GOES_HERE,
                client_secret: keys.APP_SECRET_GOES_HERE,
                redirect_uri: callBackUrl,
                code,
            },
        });

App settings (In the app domain field, the domain is localhost. basic fields like name and email are filled others are empty) (please click on the link to view image) Facebook app setting. In the app domain field, the domain is localhost. basic fields like name and email are filled others are empty

Facebook login settings (please click on the link to view image) Client OAuth login, Web OAuth login, Enforce HTTPS, Use Strict Mode for redirect URIs fields are enabled and rest are disabled or left empty



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source