friendship ended with social-app. php is my new best friend

fix redirects?

Changed files
+3 -4
+3 -4
index.php
···
'client_assertion_type' => 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
'client_assertion' => $token->toString()
]);
-
header('Location: '.$auth_url);
+
Flight::redirect($auth_url);
die(1);
} else if (isset($_GET['code'], $_GET['iss'])) {
$storage->storeAccessToken($_GET['code'], $name);
$_SESSION['sbs_'.SITE_DOMAIN.'_pds'] = $_GET['iss'];
$_SESSION['sbs_'.SITE_DOMAIN.'_userinfo'] = $bskyToucher->getUserInfo()
-
header('Location: https://'.SITE_DOMAIN);
+
Flight::redirect('/');
die(1);
} else if (isset($_GET['error'])) {
die(1);
···
'ogimage' => '',
'ogurl' => 'https://'.SITE_DOMAIN.'/login'
]));
-
die(1);
}
});
···
unset($_SESSION['sbs_'.SITE_DOMAIN]);
unset($_SESSION['sbs_'.SITE_DOMAIN.'_pds']);
unset($_SESSION['sbs_'.SITE_DOMAIN.'_userinfo']);
-
header('Location: https://'.SITE_DOMAIN);
+
Flight::redirect('/');
});
Flight::route('/createaccount', function(): void {