SteveMcArthur / docpad-plugin-authentication

Handles authentication and login functionality via social login for your docpad application. Protects pages from unauthenticated users. Uses the node module social-login (https://github.com/26medias/social-login) to standardise the configuration interface to the various login strategies and handle routing and redirection.
http://login-stevehome.rhcloud.com
Other
4 stars 1 forks source link

if no strategies are configured, plugin will cause docpad to fail with: "TypeError: OAuth2Strategy requires a clientID option" #1

Closed SteveMcArthur closed 9 years ago

SteveMcArthur commented 9 years ago

By default the plugin is hardcoded configured with the strategies for facebook and twitter, BUT without the clientID or clientSecret (sensible). This means that if these values are not supplied by the application via a plugin configuration in the docpad.coffee file, the whole application will fall over with: "TypeError: OAuth2Strategy requires a clientID option".

SteveMcArthur commented 9 years ago

Hardcoded configs now removed. Plugin now checks that all strategies are configured with clientID and clientSecret. If not, the strategy is removed and a warning is issued. If no strategies are configured then warning issued that no strategies are configured and no pages will be protected by authentication.