A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: rocksky oauth fixes

+7 -8
+1 -4
src/components/output/raw/atproto/oauth.js
··· 35 35 // CONFIGURE 36 36 // ========= 37 37 38 - const location = globalThis.location; 39 - 40 38 let redirect_uri = location.origin + location.pathname + location.search; 41 39 42 40 const isLocalDev = redirect_uri.startsWith("http://127.0.0.1"); ··· 81 79 * @param {string} handle 82 80 */ 83 81 export async function login(handle) { 84 - const location = globalThis.location; 85 - 86 82 sessionStorage.setItem( 87 83 "oauth/callback/redirect_path", 88 84 location.pathname + location.search, 89 85 ); 86 + 90 87 sessionStorage.setItem("oauth/pending-client", CLIENT_KEY); 91 88 92 89 const authUrl = await createAuthorizationUrl({
+6 -4
src/components/supplement/rocksky/oauth.js
··· 33 33 // CONFIGURE 34 34 // ========= 35 35 36 - const location = globalThis.location; 36 + let redirect_uri = location.origin + location.pathname + location.search; 37 37 38 - const redirect_uri = location.origin + location.pathname + location.search; 38 + const isLocalDev = redirect_uri.startsWith("http://127.0.0.1"); 39 39 40 - const isLocalDev = redirect_uri.startsWith("http://127.0.0.1") || 41 - redirect_uri.startsWith("http://localhost"); 40 + if (!isLocalDev) { 41 + redirect_uri = location.origin + "/oauth/callback"; 42 + } 42 43 43 44 const client_id = isLocalDev 44 45 ? `http://localhost/?redirect_uri=${encodeURIComponent(redirect_uri)}&scope=${ ··· 77 78 "oauth/callback/redirect_path", 78 79 location.pathname + location.search, 79 80 ); 81 + 80 82 sessionStorage.setItem("oauth/pending-client", CLIENT_KEY); 81 83 82 84 const authUrl = await createAuthorizationUrl({