liberapay / liberapay.com

Source code of the recurrent donations platform Liberapay
https://liberapay.com/
1.62k stars 208 forks source link

Mastodon `host-meta` #945

Open Changaco opened 6 years ago

Changaco commented 6 years ago

Via email:

I'm trying to connect our Mastodon account, ps@s10y.eu to our newly created Liberapay account. But the implementation of the connection assumes that domain is running the Mastodon instance instead of properly requesting the /.well-known/host-meta and dereferencing from there. Our Mastodon instance, like many, run on a subdomain (ps.s10y.eu AKA WEB_DOMAIN) but offers accounts on the top domain (s10y.eu AKA LOCAL_DOMAIN). In this setup, the LOCAL_DOMAIN serves a host-meta telling the Webfinger client to call llrd to https://#{WEB_DOMAIN}/.well-known/webfinger?resource={uri}, where proper resolution of ps@s10y.eu to https://ps.s10y.eu/@ps can occur.

hellekin commented 6 years ago

Via email:

Have you tried inputting ps@ps.s10y.eu for the account address on Liberapay instead of ps@s10y.eu?

Hi @Changaco, Yes I did, although I knew it would not work, since the WebID is acct:user@s10y.eu and not acct:user@ps.s10y.eu. That's how I could figure out what was going on with the way your implementation of Webfinger works today. It does not follow protocol and assumes too many things about the remote domain instead, which is why it does not work in this case. Following protocol would fix this, and probably many other instances since OAuth is used in many places.

clehner commented 6 months ago

Attempting to link my account (@)username@domain was unsuccessful for instance at subdomain (social.domain) Error triggered: https://github.com/liberapay/liberapay.com/blob/2486e6b36eba76d2c8a1b882026265c5ab9ad88b/liberapay/elsewhere/mastodon.py#L74

Linking with (@)username@subdomain is successful; though this id is not correct, the URL is (https://subdomain/@username)