A proxy to Mastodon API that adds a fake_email
field to the Account
object returned by verify_credentials
.
Every other response, even Account
responses from other endpoints, are left untouched.
Run the container. BACKEND_URL
is expected to point to the real mastodon URL. DOMAIN
is the email domain used to form fake_email
, in the form of {acct}@{DOMAIN}
, where acct
is the acct
field returned by Mastodon.
Optionally, MIN_AGE
allows defining a minimum account age (time since the account was created, not the age of the person using the account). If defined, requests to verify_credentials
for accounts below the minimum age will return 403 Forbidden
.
On wiki.js:
- Use your usual mastodon url for
Authorization Endpoint URL
, e.g.https://your.instance/oauth/authorize
- Use your usual mastodon url for
Token Endpoint URL
, e.g.https://your.instance/oauth/token
- Use the URL of this thing for
User info Endpoint URL
, e.g.https://api-proxy.your.instance/api/v1/accounts/verify_credentials
. It must be an https URL or mastodon will attempt to redirect it to https. - As
ID Claim
,Display Name Claim
andEmail Claim
useid
,display_name
andfake_email
respectively.fake_email
is what this proxy adds.
On your mastodon instance:
- Add the domain where this thing listens (e.g.
api-proxy.your.instance
) to theALTERNATE_DOMAINS
environment variable for mastodon-web.
And you're good to go!