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
··· 238 238 ]); 239 239 header('Location: '.$auth_url); 240 240 die(1); 241 - } else if (isset($_GET['code'], $_GET['state'])) { 242 - $token = $provider->getAccessToken($_GET['code'], $_GET['state']); 241 + } else if (isset($_GET['code'])) { 242 + // https://smallbird.social/login?iss=https%3A%2F%2Fshimaenaga.veryroundbird.house&code=cod-3a80b9095e871dc4bc2391f876cc234abefcbb66ca65e8a381e99095b8899b0e 243 + $token = $provider->getAccessToken($_GET['code'], null); 243 244 $storage = new SessionStorage($options); 244 245 $storage->storeAccessToken($token, $name); 245 - header('Location: ?granted='.$name); 246 - die(1); 247 - } else if (isset($_GET['granted']) && $_GET['granted'] === $name) { 248 - $tokenJSON = $provider->getAccessTokenFromStorage()->toJSON(); 249 - header('Location: https://'.SITE_DOMAIN); 246 + header('Location: https://'.SITE_DOMAIN); 250 247 die(1); 251 248 } else if (isset($_GET['error'])) { 252 249 die(1);