strongloop / loopback-component-oauth2

oAuth 2.0 server for LoopBack
http://www.strongloop.com
Other
62 stars 63 forks source link

Flash Errors #63

Closed talpasco closed 6 years ago

talpasco commented 7 years ago

Hi,

Couldn't flash the error message after a failed login attempt. And then I realized that the strategy is being set 'hard-coded' ('loopback-component-oauth2\lib\oauth2-loopback.js', line 828).

And so, I modified it to use the 'local' strategy, and to flash errors... and voila, it works. This is how: app.post(options.loginPath || '/login', passport.authenticate('local', {successReturnToOrRedirect: '/', failureRedirect: options.loginPage || '/login', failureFlash: true}));

I was wondering if there is a way to configure it, outside of the node-module scope.

Thanks, Tal

stale[bot] commented 7 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

UVk commented 7 years ago

This issue is important and should not be stale.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 6 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.