Skip to content

Commit

Permalink
fixed facebook login window is always in popup mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Joungkyun committed May 11, 2019
1 parent e4b62ac commit 9f75628
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
1 change: 1 addition & 0 deletions OAUTH2.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
* - id Service Provider 에서 발급받은 client ID
* - secret Service Provider 에서 발급받은 client secret key
* - callback 이 class가 호출되는 URL (또는 provider에 등록한 callback url)
* - popup Facebook 처럼 popup login 창을 지원하는 경우 ture 로 지정
* @return void
*/
function __construct ($app) {
Expand Down
7 changes: 5 additions & 2 deletions OAUTH2/FACEBOOK.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
* - id 발급받은 Facebook login Application ID
* - secret 발급받은 Facebook login Application Scret key
* - callback 이 클래스가 호출되는 url
* - popup true 일 경우, requset URL에 popup login 옵션을 추가
* @return void
*/
function __construct ($v) {
Expand Down Expand Up @@ -159,10 +160,12 @@ private function reqLogin () {
if ( $_GET['code'] || isset ($this->sess->oauth) )
return;

$opt = $this->apps->popup ? '&display=popup' : '';

$url = sprintf (
'%s?scope=email&client_id=%s&response_type=code&redirect_uri=%s&state=%s&display=popup',
'%s?scope=email&client_id=%s&response_type=code&redirect_uri=%s&state=%s%',
$this->reqAuth, $app->id,
rawurlencode ($app->callback), $this->sess->state
rawurlencode ($app->callback), $this->sess->state, $opt
);

Header ('Location: ' . $url);
Expand Down
26 changes: 20 additions & 6 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2018-05-26</date>
<time>06:31:29</time>
<date>2019-05-12</date>
<time>00:10:51</time>
<version>
<release>1.0.8</release>
<release>1.0.9</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>* fixed #5 Support KAKAO API v2
<notes>* fixed facebook login window is always in popup mode
</notes>
<contents>
<dir name="/">
<file role="php" md5sum="45cfc4aade31eb15390c5fe702f370b7" name="OAUTH2.php" />
<file role="php" md5sum="ce72c92a3abbc5f3dd46c3f8ba40c6bb" name="OAUTH2.php" />
<file role="php" md5sum="7369d3d6c966413e74ebd73434b82da2" name="OAUTH2/DAUM.php" />
<file role="php" md5sum="0042e2f230145691b42ed314f7907534" name="OAUTH2/FACEBOOK.php" />
<file role="php" md5sum="e30204abacf75ba8bbbda8d6d398f9b6" name="OAUTH2/FACEBOOK.php" />
<file role="php" md5sum="d32c59d9fbae70fdb2c8195979360cf1" name="OAUTH2/GITHUB.php" />
<file role="php" md5sum="045c517caff5841e7e6446314976fed4" name="OAUTH2/GOOGLE.php" />
<file role="php" md5sum="3797738c2b378b1e2a2c703ca4377d92" name="OAUTH2/KAKAO.php" />
Expand Down Expand Up @@ -59,6 +59,20 @@
</dependencies>
<phprelease />
<changelog>
<release>
<version>
<release>1.0.9</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2019-05-12</date>
<license uri="https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>* fixed facebook login window is always in popup mode
</notes>
</release>
<release>
<version>
<release>1.0.8</release>
Expand Down
20 changes: 17 additions & 3 deletions package.xml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<date>@curdate@</date>
<time>@curtime@</time>
<version>
<release>1.0.8</release>
<release>1.0.9</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>* fixed #5 Support KAKAO API v2
<notes>* fixed facebook login window is always in popup mode
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -61,7 +61,7 @@
<changelog>
<release>
<version>
<release>1.0.8</release>
<release>1.0.9</release>
<api>1.0.0</api>
</version>
<stability>
Expand All @@ -70,6 +70,20 @@
</stability>
<date>@curdate@</date>
<license uri="https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>* fixed facebook login window is always in popup mode
</notes>
</release>
<release>
<version>
<release>1.0.8</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2018-05-26</date>
<license uri="https://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>
* fixed #5 Support KAKAO API v2
</notes>
Expand Down

0 comments on commit 9f75628

Please sign in to comment.