示例#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;
}