a proof of concept realtime collaborative text editor using atproto as a sync server jake.tngl.io/y-pds/
0

Configure Feed

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

ypds / callback.html
740 B 25 lines
1<!doctype html> 2<script type="importmap"> 3 { 4 "imports": { 5 "@atcute/client": "https://esm.sh/@atcute/client", 6 "@atcute/identity-resolver": "https://esm.sh/@atcute/identity-resolver", 7 "@atcute/oauth-browser-client": "https://esm.sh/@atcute/oauth-browser-client@3.0.0" 8 } 9 } 10</script> 11<script type="module"> 12 import { finalizeAuthorization } from "@atcute/oauth-browser-client"; 13 14 import { configure } from "./oauth.js"; 15 configure(); 16 17 const params = new URLSearchParams(location.hash.slice(1)); 18 19 finalizeAuthorization(params) 20 .then(agent => { 21 localStorage.setItem("ypds:did", agent.session.info.sub); 22 window.location.assign("/y-pds/"); 23 }) 24 .catch(err => console.error(err)); 25</script>