I am missing something in how the Valid OAuth redirect URIs of Facebook work, in combination with the 'Strict Mode'.
In my PHP code, I generate the authentication URL with the following line,
$fbauthurl = $fbhelper->getLoginUrl('https://new.didactigo.com/auth/facebookProcess', $permissions);
I have also added that exact URL to the Facebook Valid OAuth redirect URIs section, as shown in this image:
I have also added that domain to my 'App Domains':
However, when I enable 'Strict mode' (as will be required per March), this exception is raised;
Can't Load URL: 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.
Without the 'Strict Mode', all works fine.
Similarly, the Facebook URL tester also tells me the URL the user finally lands on, is invalid and not added to the 'Valid OAuth redirect URLs'; as shown here:
However, this is the same base URL. Without the query parameters, this URL is accepted.
Thus the query parameters are apparently not ignored. But how can that be, because Facebook adds the dynamic 'code' and 'state' parameter to the URL themselves, I cannot predict these values and write them into the Facebook Valid OAuth redirect URIs section? I seem to miss something.
Is this not necessary for my webapp, or am I doing something wrong there? Any comment on this is really appreciated!
Edit: This post is similar to my issue, however, at that time the "Strict mode" did not exists nor does any of the solutions provided solve my issue. I have however used their suggestions and doubled checked my app id & app secret.