Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mattes3 opened this issue Aug 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@mattes3
Copy link

mattes3 commented Aug 23, 2024

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

{
  "subject":"acct:[email protected]",
  "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? 😀

@dahlia
Copy link
Owner

dahlia commented Aug 24, 2024

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

@dahlia dahlia added the enhancement New feature or request label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants