Prototype: Bluesky-authenticated comments on blog posts - #76
Open
lksbrssr wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A prototype of reader comments on blog posts, authenticated with Bluesky — the "lightweight, no password, but you say who you are" model. It reuses the site's existing AT-Protocol OAuth (
/api/login,/api/oauth/callback,useAuth) so signing in is one click with a Bluesky handle, and every comment carries a real, verified identity (handle, display name, avatar) instead of a free-text name box.Screenshots
Empty state + sign-in box (bottom of a blog post):

How it works
plresearch.orgservice repo (same app-password service agent already used by the pages / opportunity-spaces editors) under a neworg.plresearch.commentcollection.listRecordscall filtered by post slug — no firehose/indexer dependency, so it works the moment this merges.returnTothrough the OAuthstateparam, so readers land back on the post after signing in (backward-compatible — existinglogin(handle)callers unchanged).Files
src/lib/lexicons.tsorg.plresearch.commentcollection + typessrc/lib/comments.tssrc/app/api/comments/route.tssrc/components/Comments.tsxsrc/app/blog/[slug]/page.tsx<Comments>(skipped for external-stub posts)src/app/api/login,oauth/callback,src/lib/atproto.tsxreturnToafter login.env.exampleATPROTO_HANDLE/ATPROTO_PASSWORDDeliberate prototype tradeoffs / open questions
org.plresearch.comment— happy to switch.ATPROTO_HANDLE/ATPROTO_PASSWORDto be set in the deployment (already used elsewhere). Without them the API returns a clean "not configured" message.Verified
tsc --noEmitcleannext buildsucceeds;/api/commentsregistered as a dynamic route; all 310 static pages generate