Auto redirecting after login

This commit is contained in:
aymm 2021-04-05 12:44:59 +02:00
parent 206bcf1bc1
commit 8bb931636d
Signed by: phlaym
GPG Key ID: A06651BAB6777237

View File

@ -1,25 +1,12 @@
<?php
/*require __DIR__ .'/vendor/autoload.php';
use APnutI\APnutI;
session_start();
$api = new APnutI(
'DKXEf-a9t6_1wWNnQK-bHijxLCIRXFBk',
'mmZhbsH4KIoFkqnbIOVMktTSKypZ_QQk',
'basic,polls,public_messages,stream,update_profile,write_post',
'Playground',
'http://localhost/auth_callback.php',
'./log.log'
);*/
require_once __DIR__ .'/bootstrap.php';
if (isset($_GET['code'])) {
$success = $api->authenticate($_GET['code']);
if ($success) {
die('Welcome! <a href="index.php">Back to home</a>');
redirect('index.php');
} else {
die('Echo error authenticating');
}