feathersjs-ecosystem / authentication-oauth2

[MOVED] OAuth 2 plugin for feathers-authentication
https://github.com/feathersjs/feathers
MIT License
26 stars 15 forks source link

Unable to override Facebook display options #32

Closed JulsRicketti closed 6 years ago

JulsRicketti commented 7 years ago

When accessing and enabling our app for Facebook, we get the following error message on smaller screens:

You are using a display type of 'page' in a small browser window or popup. For a better user experience, show this dialog with our JavaScript SDK without specifying an explicit display type. The SDK will choose the best display type for each environment. Alternatively, use display type 'popup' if you have special requirements precluding you from using the SDK. This message is only visible to developers of your application.

screen shot 2017-08-25 at 5 22 32 pm

In the configurations, the display option is never touched, therefore it should be defaulted into whatever the Facebook SDK has it set as. However, because the message is being displayed it probably is not the case.

Tried to override it in the oauth2 configurations, but to no avail.

app.configure(oauth2({
    name: 'facebook',
    Strategy: FacebookStrategy.Strategy,
    display: undefined // also tried with 'popup' or even 'undefined' but didn't make a difference
  }))

To be able to change display at all, we have to override in FacebookStrategy.Strategy in Strategy, but that still doesn't solve the problem of not wanting to specify the display.

Anyway, the bottom line is I would like to make that error message disappear through oauth2 configurations and have not found a way to do so.

Thanks in advance!

daffl commented 7 years ago

Hm, the options has been removed from the documentation in passport-facebook (see https://github.com/jaredhanson/passport-facebook/issues/29#issuecomment-288611118) but it doesn't say why or how to update it. Is there an example how to do it with passport-facebook directly?