Permalink
Browse files

adding a value for checking against oauth (#374)

  • Loading branch information...
1 parent c69923e commit c5823a48b9992702b2f8dc1cfbd1b64855833199 @ekryski ekryski committed on GitHub Dec 14, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/express/authenticate.js
@@ -28,7 +28,7 @@ export default function authenticate (strategy, options = {}) {
Object.assign(req, { authenticated: true }, result.data);
Object.assign(req.feathers, { authenticated: true }, result.data);
- if (options.successRedirect) {
+ if (options.successRedirect && !options.__oauth) {
debug(`Redirecting to ${options.successRedirect}`);
res.status(302);
return res.redirect(options.successRedirect);
@@ -38,7 +38,7 @@ export default function authenticate (strategy, options = {}) {
}
if (result.fail) {
- if (options.failureRedirect) {
+ if (options.failureRedirect && !options.__oauth) {
debug(`Redirecting to ${options.failureRedirect}`);
res.status(302);
return res.redirect(options.failureRedirect);

0 comments on commit c5823a4

Please sign in to comment.