2021-03-11 16:51:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once __DIR__ .'/bootstrap.php';
|
|
|
|
|
|
|
|
$is_authenticated = $api->isAuthenticated();
|
|
|
|
if (!$is_authenticated) {
|
|
|
|
echo '<a href="' . $api->getAuthURL() . '">Login with pnut</a>';
|
|
|
|
} else {
|
2021-03-27 10:45:25 +00:00
|
|
|
$u = $api->getAuthorizedUser();
|
|
|
|
echo 'Welcome @'.$u->username;
|
2021-03-11 16:51:25 +00:00
|
|
|
}
|