From e9e6a47652ada7bb2b5ddafe39464107faf6c072 Mon Sep 17 00:00:00 2001 From: Nilaf Talapady Date: Mon, 5 May 2014 22:05:19 +0530 Subject: [PATCH] forcePassword added Force user to enter password --- lib/passport-google-oauth/oauth2.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/passport-google-oauth/oauth2.js b/lib/passport-google-oauth/oauth2.js index 7a0368f..e0b3358 100644 --- a/lib/passport-google-oauth/oauth2.js +++ b/lib/passport-google-oauth/oauth2.js @@ -109,6 +109,12 @@ Strategy.prototype.authorizationParams = function(options) { if (options.approvalPrompt) { params['approval_prompt'] = options.approvalPrompt; } + + // Force user to enter password + if (options.forcePassword) { + params['max_auth_age'] = 0; + } + if (options.prompt) { // This parameter is undocumented in Google's official documentation. // However, it was detailed by Breno de Medeiros (who works at Google) in