diff --git a/JS/BlueskyAPI.js b/JS/BlueskyAPI.js index 96457b0..f294473 100644 --- a/JS/BlueskyAPI.js +++ b/JS/BlueskyAPI.js @@ -130,7 +130,7 @@ export async function HandleAuthorization(BlueskyPKCEverifer, BlueskyPKCEchallen export async function GainTokens(PKCEcodeName, NonceName, AccessToken, RefreshToken) { // Check to see if something's a miss... - if ((document.location.href.split("state=").length > 1 && document.location.href.split("iss=").length > 1 && document.location.href.split("code=").length > 1) && document.cookie.split("; ").find((row) => row.startsWith(PKCEcodeName + "="))?.split("=").length > 1 && document.location.href.split("code=").length > 1) && document.cookie.split("; ").find((row) => row.startsWith(AccessToken + "="))?.split("=").length == 1) { + if ((document.location.href.split("state=").length > 1 && document.location.href.split("iss=").length > 1 && document.location.href.split("code=").length > 1) && document.cookie.split("; ").find((row) => row.startsWith(PKCEcodeName + "="))?.split("=").length > 1 && document.cookie.split("; ").find((row) => row.startsWith(AccessToken + "="))?.split("=").length == 1) { // Create varaibles, be aware of waits because of internet. let DPoP = await ClientDPoP("POST", "https://bsky.social/oauth/token", document.cookie.split("; ").find((row) => row.startsWith(NonceName + "="))?.split("=")[1]); let PKCE = document.cookie.split("; ").find((row) => row.startsWith(PKCEcodeName + "="))?.split("=")[1];