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

adjust oauth flow for bsky sensibilities

Changed files
+4 -7
+4 -7
index.php
···
]);
header('Location: '.$auth_url);
die(1);
-
} else if (isset($_GET['code'], $_GET['state'])) {
-
$token = $provider->getAccessToken($_GET['code'], $_GET['state']);
+
} else if (isset($_GET['code'])) {
+
// https://smallbird.social/login?iss=https%3A%2F%2Fshimaenaga.veryroundbird.house&code=cod-3a80b9095e871dc4bc2391f876cc234abefcbb66ca65e8a381e99095b8899b0e
+
$token = $provider->getAccessToken($_GET['code'], null);
$storage = new SessionStorage($options);
$storage->storeAccessToken($token, $name);
-
header('Location: ?granted='.$name);
-
die(1);
-
} else if (isset($_GET['granted']) && $_GET['granted'] === $name) {
-
$tokenJSON = $provider->getAccessTokenFromStorage()->toJSON();
-
header('Location: https://'.SITE_DOMAIN);
+
header('Location: https://'.SITE_DOMAIN);
die(1);
} else if (isset($_GET['error'])) {
die(1);