javascript - Need to redirect to google app email login page instead of normal gmail login in passportjs and nodejs -
i have nodejs application. in setup google auth2 login system using passport js. need authenticate against google app email id not normal gmail id. authentication working fine. not redirecting google app email login page (google.com/a/domain.com). redirect gmail login page , there can login , authenticate typing full email id (username@domain.com). there way redirect app engine login page have needed type username only.
i got solution editing file
node_modules/passport-google-oauth/lib/passport-oauth/strategies/oauth2.js
i added new line in line 164 below following 2 lines params['response_type'] = 'code'; params['redirect_uri'] = callbackurl;
new line given below params['hd'] = "domainname.com";
now redirecting domain specific login page
Comments
Post a Comment