bluesky-social / feed-generator

ATProto Feed Generator Starter Kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service DID is optional, but...

MarshalX opened this issue · comments

Hi! I'm (and not only me) confused about how we can host Feed without deal with DID:PLC.

Few notes:

  • yeah, we can skip Service DID and did:web will be used
  • no, we can't forget about did:plc if we are using did:web...
  • we must specify Feed URI that we receive after publishing the feed because of next item
  • Bluesky server sends requests with "feed" query parameter including "did:plc" always! To properly check this parameter the feed server must know the Feed URI including "did:plc", of course.

Well... On one side. Service DID is optional that gives as the ability to forget about "DID:PLC". On the other side, the "feed" param verification in the official example uses URI including "DID:PLC". So we can't forget about it!

The current implementation looks like this:

It will be nice to not deal with DID:PLC at all if we are using DID:WEB. And it's pretty easy to achieve! Let's split the "feed" param and use only rkey to match the algo.

And here is my final questions. Is it fine to do so? Does the feed-generator repository show the best practice?

UPD. Maybe Bluesky server could send requests with URI that contains DID:WEB instead?

+1 I also found it confusing that the feed param passed from bsky.app was always did:plc, and also that there were not clear instructions on where to find your did:plc (note to anyone stumbling upon this: once you publishFeed it's in the URL for the feed in bsky.app, check your profile!).

Thanks for raising this concern, I'll work it into the documentation.

As @byronhulcher pointed out, there are 2 DIDs in play here.

(and just a note, either can technically be plc or web. but user accounts are most commonly plc & feed gens are most commonly web)

A Feed Generator is identified by a DID (this is the did:web that comes setup with the feed gen server)

The actual Feed that a Feed Generator produces is identified by an at-uri that points to a record in your repo

So unfortunately both dids are necessary here