예제 #1
0
<?php

require __DIR__ . '/bootstrap.php';
if (isset($_SESSION['auth'])) {
    $_SESSION['auth'] = array();
}
stopAndRedirect('index.php');
예제 #2
0
파일: auth.php 프로젝트: veksa/php-social
<?php

require __DIR__ . '/bootstrap.php';
try {
    $type = _GET('type');
    $auth = \Social\Factory::getInstance()->createAuth($type);
    $url = $auth->getAuthorizeUrl($REDIRECT_URL . '?type=' . $type);
    stopAndRedirect($url);
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
    exit;
}