From a3498f5a033136b447fb004965313aa9ae530965 Mon Sep 17 00:00:00 2001 From: CatAClock Date: Mon, 28 Apr 2025 14:40:45 -0700 Subject: [PATCH] PROGRESS! A 201! --- JS/BlueskyAPI.js | 1 + JS/mail.js | 2 +- oauth/client-metadata.json | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/JS/BlueskyAPI.js b/JS/BlueskyAPI.js index da58237..be0afb5 100644 --- a/JS/BlueskyAPI.js +++ b/JS/BlueskyAPI.js @@ -64,6 +64,7 @@ export async function ClientDPoP() { var sPayload = JSON.stringify(Payload); var JWT = KJUR.jws.JWS.sign("HS256", sHeader, sPayload, "616161"); console.log(JWT); + return JWT; } export async function ServerDPoP() { diff --git a/JS/mail.js b/JS/mail.js index e045226..e316836 100644 --- a/JS/mail.js +++ b/JS/mail.js @@ -106,7 +106,7 @@ async function BlueskyTestingAuthorization() { let TestingVerifier = await BlueskyAPI.CreatePKCECodeVerifier() let TestingChallenge = await BlueskyAPI.CreatePKCECodeChallenge(TestingVerifier); - let TestingRequest = fetch(PAREndpoint + "?state=" + TestingState + "&pkceChallenge=" + TestingChallenge + "&scopes=atproto&login_hint=crowdedgames.group", {method: "POST"}); + let TestingRequest = fetch(PAREndpoint, {method: "POST", body: new URLSearchParams({ response_type: "code", code_challenge_method: "S256", scope: "atproto", client_id: "https://fedi.crowdedgames.group/oauth/client-metadata.json", redirect_uri: "https://fedi.crowdedgames.group/HTML/mail.html", code_challenge: TestingChallenge, state: TestingState, login_hint: "crowdedgames.group" }), "Content-Type": "application/x-www-form-urlencoded"}); console.log(TestingRequest); } diff --git a/oauth/client-metadata.json b/oauth/client-metadata.json index 8109fa3..9ca5ace 100644 --- a/oauth/client-metadata.json +++ b/oauth/client-metadata.json @@ -1,7 +1,7 @@ { "client_id": "https://fedi.crowdedgames.group/oauth/client-metadata.json", "application_type": "web", - "client_name": "Example Browser App", + "client_name": "Channel Viewer", "client_uri": "https://fedi.crowdedgames.group", "dpop_bound_access_tokens": true, "grant_types": [ @@ -14,5 +14,6 @@ "response_types": [ "code" ], - "scope": "atproto transition:generic", + "token_endpoint_auth_method": "none", + "scope": "atproto transition:generic" }