dragonpolls/auth_callback.php

16 lines
336 B
PHP
Raw Permalink Normal View History

2021-03-11 16:51:25 +00:00
<?php
require_once __DIR__ .'/bootstrap.php';
if (isset($_GET['code'])) {
$success = $api->authenticate($_GET['code']);
if ($success) {
2021-04-05 10:44:59 +00:00
redirect('index.php');
2021-03-11 16:51:25 +00:00
} else {
2021-04-17 14:04:34 +00:00
quit(get_page_header().'Echo error authenticating');
2021-03-11 16:51:25 +00:00
}
} else {
2021-04-17 14:04:34 +00:00
quit(get_page_header().'Echo error authenticating: '. $_GET['error_message']);
2021-03-11 16:51:25 +00:00
}