MantisBT - TestLink
View Issue Details
0008673TestLinkUser Authentication Methodspublic2019-05-24 15:162019-05-26 08:55
satish.p48rx@gmail.com 
fman 
urgentcrashalways
resolvedfixed 
1.9.19 (2019 Q1) 
1.9.20 Raijing DEV 
mysql
7.x
TBD
0008673: https google oauth fails to login due to mismatch in redirect_uri
Google oauth authentication fails if we are trying to login via https

the reason is below..

In lib/function/oauth_providers/google.php

In $oauthParams,the array item redirect_uri doesn't append the host after https:// protocol. It is just appending with http://
 //Params to get token
  $oauthParams = array(
     'code' => $code,
     'grant_type' => $authCfg['oauth_grant_type'],
     'client_id' => $authCfg['oauth_client_id'],
     'redirect_uri' => isset($_SERVER['HTTPS']) ? 'https://' [^] : 'http://' [^] . $_SERVER[HTTP_HOST]. '/login.php?oauth=google',
     'client_secret' => $authCfg['oauth_client_secret']
  );
isset($_SERVER['HTTPS']) ? 'https://' [^] : 'http://' [^] . $_SERVER[HTTP_HOST]. '/login.php?oauth=google' --> this line of code fails and it just returns https://
No tags attached.
child of 0008549assigned fman Availables hot-fixes for 1.9.19 & How To get full fixed package from GitHub 
Issue History
2019-05-24 15:16satish.p48rx@gmail.comNew Issue
2019-05-25 08:25fmanNote Added: 0028867
2019-05-26 08:54fmanQA Team - Task Workflow Status => TBD
2019-05-26 08:54fmanNote Added: 0028868
2019-05-26 08:54fmanStatusnew => resolved
2019-05-26 08:54fmanFixed in Version => 1.9.20 Raijing DEV
2019-05-26 08:54fmanResolutionopen => fixed
2019-05-26 08:54fmanAssigned To => fman
2019-05-26 08:55fmanRelationship addedchild of 0008549

Notes
(0028867)
fman   
2019-05-25 08:25   
thanks, going to fix
(0028868)
fman   
2019-05-26 08:54   
already fixed