Skip to content

Webfinger in Fedify should support Mastodon's special rel= 'http://ostatus.org/schema/1.0/subscribe' and template #119

Description

@mattes3

When you webfinger an account on a Mastodon instance, you get a list of links, one of them has a template:

{
  "subject":"acct:sundogplanets@mastodon.social",
  "aliases":["https://mastodon.social/@sundogplanets","https://mastodon.social/users/sundogplanets"],
  "links":[
    {"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://mastodon.social/@sundogplanets"},
    {"rel":"self","type":"application/activity+json","href":"https://mastodon.social/users/sundogplanets"},
    {"rel":"http://ostatus.org/schema/1.0/subscribe","template":"https://mastodon.social/authorize_interaction?uri={uri}"},
    {"rel":"http://webfinger.net/rel/avatar","type":"image/jpeg","href":"https://files.mastodon.social/accounts/avatars/108/194/428/751/240/116/original/f1eb397ab1659575.jpeg"}
  ]
}

The link with the template can be used to simplify a federated follow request. When you replace the {uri} parameter in the string by a Fediverse handle like username@domain, the link redirects you to their profile page as seen from the perspective of the other Mastodon server, e.g. mastodon.social in this case.

On that mirrored profile page, you can simply click the Follow button, and you're done.

I wanted to make this work with Fedify so that other people can easily follow me on my app, but I couldn't figure out how to add such a template-based URL to the urls collection of my actor object, so that Fedify's webfinger endpoint would show it.

The problem was that the Link class in the vocabulary does not support the (Mastodon-only) template field. Could you add this in Fedify, as a non-standard feature?

You can see a good application of this mechanism in Guppe: https://github.com/immers-space/guppe/blob/7d44a6df88a4a60e05ad6360aac6835e291b0ced/web/src/views/Profile.vue#L88

Guppe supports this "reverse follow" to make it easy to follow a gup.pe group. It would be great if Fedify-based apps would support this out of the box.

Does this all make sense? 😀

Activity

  1. dahlia commented on Aug 24, 2024

    @dahlia
    Member

    In fact, I've been working on a feature that would allow you to customize WebFinger responses, but it won't happen anytime soon.

  2. dodok8 commented on Sep 1, 2025

    @dodok8
    Member

    I'll work on this. This is related to fedify-dev/botkit#14.

  3. mattes3 commented on Sep 7, 2025

    @mattes3
    Author

    Wow, thanks for adding this! Will try it soon!

  4. dahlia commented on Sep 7, 2025

    @dahlia
    Member

    It will be shipped with the next minor release, v1.9.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Fields

Priority

None yet

Effort

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions