···
$provider = new BskyProvider($options, $client, $httpFactory, $httpFactory, $httpFactory);
$name = $provider->getName();
229
-
if (isset($_GET['login']) && $_GET['login'] === $name) {
230
-
$auth_url = $provider->getAuthorizationUrl([
231
-
'client_assertion_type' => 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
232
-
'client_assertion' => $token->toString()
234
-
Flight::redirect($auth_url);
236
-
} else if (isset($_GET['code'], $_GET['iss'])) {
237
-
$storage->storeAccessToken($_GET['code'], $name);
238
-
$_SESSION['sbs_'.SITE_DOMAIN.'_pds'] = $_GET['iss'];
239
-
$_SESSION['sbs_'.SITE_DOMAIN.'_userinfo'] = $bskyToucher->getUserInfo();
240
-
Flight::redirect('/');
242
-
} else if (isset($_GET['error'])) {
228
+
if (isset($_GET['login']) && $_GET['login'] === $name) {
229
+
$auth_url = $provider->getAuthorizationUrl([
230
+
'client_assertion_type' => 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
231
+
'client_assertion' => $token->toString()
233
+
Flight::redirect($auth_url);
235
+
} else if (isset($_GET['code'], $_GET['iss'])) {
236
+
$storage->storeAccessToken($_GET['code'], $name);
237
+
$_SESSION['sbs_'.SITE_DOMAIN.'_pds'] = $_GET['iss'];
238
+
$_SESSION['sbs_'.SITE_DOMAIN.'_userinfo'] = $bskyToucher->getUserInfo();
239
+
Flight::redirect('/');
241
+
} else if (isset($_GET['error'])) {
$latte = new Latte\Engine;
$latte->render('./templates/login.latte', array_merge(Flight::get('standardParams'), [