Skip to main content
A GitHub Link for Logged-Out Readers featured

A GitHub Link for Logged-Out Readers

September 27, 2026

4 min read
DevelopmentGiscussionsMeta
Photo by Chaozzy Lin

After moving reactions inline last time, the next thing bugging me was smaller but stranger: what happens to a reader who doesn't want to sign in?

Logged-out comment box showing View on GitHub fallback beside Sign in with GitHub

If you're logged out and a discussion already exists for the post, Giscussions just... doesn't post. No obvious way to read further or join in without granting the app posting permissions1 first. Some people genuinely don't want to do that, and I don't blame them — but they should still have a path to GitHub itself. Small feature. The rules around when to show it turned out stricter than I expected.

The actual gap

Signed-in users had a clear flow. Logged-out users hit a dead end that looked like a dead end, even when a real conversation already existed one click away on GitHub. That's avoidable friction, and it ignores a real preference some readers have for participating from GitHub directly instead of through the embedded widget.

Why I couldn't just remove the auth check

Discussion creation is gated in the backend on purpose — pages/api/discussions/index.ts#L96 rejects unauthenticated requests with a 403 and Invalid or missing access token. at line 97. Reads work without sign-in; auto-create doesn't, and that's deliberate — pulling that guard would open the door to automated discussion spam. So the feature had to work within that: keep the security boundary exactly where it was, add a logged-out fallback only when a real discussion URL already exists, and never show a link on a page where no discussion exists yet (that would just be a broken link with extra steps).

What I built

A conditional secondary button next to "Sign in with GitHub" in the comment box, shown only when all three of these are true: the user is logged out, a mapped discussion URL2 already exists, and the current state doesn't imply the link would be broken anyway.

No new API route, no schema change, no auth model change — this was UI wiring using data that already existed, mostly in components/CommentBox.tsx and components/Giscus.tsx, plus the copy in locales/en/common.json. Commit 7b3f49b, README and changelog updated alongside it.

I thought about just always showing a generic link to GitHub Discussions for logged-out users, but that doesn't reliably land someone in the specific thread they were reading — close enough isn't the same as correct. I also thought about letting logged-out users auto-create a discussion anonymously when none exists, but that's directly at odds with the abuse-prevention model I'd just decided not to touch. Showing View on GitHub only when the exact mapped URL already exists was the option that didn't compromise either of those.

Logged-out state with no mapped discussion, showing fallback hidden
Signed-in state showing the default in-app comment flow

The part that looked simpler than it was

On the surface this reads as a single boolean. It isn't — behavior depends on a few independent axes at once:

StateExpected behavior
Logged out + discussion URLShow View on GitHub beside Sign in with GitHub
Logged out + no discussionKeep fallback hidden; show Sign in with GitHub only
Logged in + discussion URLNormal in-app comment flow
Logged in + no discussionNormal in-app flow; no fallback link

The button only appears in one component, but the real risk was timing — if visibility gets evaluated before the discussion-URL state actually resolves, the fallback flickers or shows stale, and fixing one branch of that state matrix can quietly regress another. I made a point of testing at least one page with an existing mapped thread and one without, in both auth states, before trusting it.

What stuck with me

Security constraints ended up shaping the product decision more than any UI intent did — I didn't get to design this feature in a vacuum, the backend guard decided half of it for me. Even a change this narrow touched UI, data flow, translation files, and docs at once, which is a good reminder that "small feature" and "small diff" aren't the same thing. And if the visibility rules for something like this aren't documented anywhere, people will read the absence of a button as a bug rather than an intentional state.


Readers could already view existing threads while logged out — that part worked fine. What was actually missing was a way to participate without handing over posting permissions, for the subset of people who'd rather not. That's a narrow, button-level fix, but it closes a gap that looked like a dead end and wasn't one.

Footnotes

  1. App posting permissions means allowing the app to publish comments via your GitHub identity after authorization. It does not grant unrestricted account access. ↩

  2. Mapped discussion URL means the current page is already linked to a specific GitHub Discussion thread. If no mapping exists yet, there is no thread URL to open. ↩

Marc Santos

Marc Santos

Full-Stack Engineer & Product Developer

I write about building things—from site features to developer tooling—alongside travel, photography, and occasional personal reflections.

When I’m not building, I’m exploring—whether that’s a new place with a camera, a mountainside, or somewhere underwater.

About MarcBuild a product together

Keep reading

Squeezing Reactions Into the Header

Squeezing Reactions Into the Header

Aug 16, 2026

Forking Giscus: Actor Gotcha

Forking Giscus: Actor Gotcha

Jul 05, 2026

Travel Map: Pins + Masonry

Travel Map: Pins + Masonry

Sep 13, 2026

Designed and developed by Marc Santos.
This website is a work in progress made with .
© 2011–2026. All Rights Reserved. Hikari v4.9.5.