|
@@ -169,6 +169,7 @@ PassportConfigurator.prototype.configureProvider = function(name, options) { |
|
|
var authPath = options.authPath || ((link ? '/link/' : '/auth/') + name);
|
|
|
var callbackPath = options.callbackPath || ((link ? '/link/' : '/auth/') +
|
|
|
name + '/callback');
|
|
|
+ var callbackHTTPMethod = options.callbackHTTPMethod !== 'post' ? 'get' : 'post';
|
|
|
|
|
|
// remember returnTo position, set by ensureLoggedIn
|
|
|
var successRedirect = function(req){
|
|
@@ -519,7 +520,7 @@ PassportConfigurator.prototype.configureProvider = function(name, options) { |
|
|
* Otherwise, authentication has failed.
|
|
|
*/
|
|
|
if (link) {
|
|
|
- self.app.get(callbackPath, passport.authorize(name, _.defaults({
|
|
|
+ self.app[callbackHTTPMethod](callbackPath, passport.authorize(name, _.defaults({
|
|
|
session: session,
|
|
|
// successReturnToOrRedirect: successRedirect,
|
|
|
successRedirect: successRedirect(),
|
|
@@ -534,6 +535,6 @@ PassportConfigurator.prototype.configureProvider = function(name, options) { |
|
|
} else {
|
|
|
var customCallback = options.customCallback || defaultCallback;
|
|
|
// Register the path and the callback.
|
|
|
- self.app.get(callbackPath, customCallback);
|
|
|
+ self.app[callbackHTTPMethod](callbackPath, customCallback);
|
|
|
}
|
|
|
};
|
0 comments on commit
1529abf