akanyan/webroot/auth.php
2022-07-11 18:18:14 +08:00

15 lines
271 B
PHP

<?php
use MingTsay\Akanyan\App;
require_once __DIR__ . '/../vendor/autoload.php';
if (($_GET['source'] ?? '') !== 'discord' || empty($_GET['code'])) {
http_response_code(403);
exit;
}
App::auth($_GET['code']);
header('location: /');
http_response_code(302);