Support per user per instance authentication

Created on 2 July 2025, 1 day ago

Problem/Motivation

This initial implementation will not support multiple users authenticating to their own instance. This aspect of the mastodon api is not documented well, see https://github.com/mastodon/mastodon/discussions/20833

But it would seem that each user should authenticate against their own mastodon app through their own user. Per https://github.com/vazaha-nl/mastodon-api-client/blob/main/examples/auth... it looks like it is possible to create an app programmatically. The current implementation skips the programmatic creation of the app, instead assuming that the app, client key, and secret were all created on the mastodon instance, and then entered into the social post mastodon settings on the drupal site.

User interface changes

It would seem that the client key, secret, and instance do not really belong in the module settings. It was set up this way assuming the same pattern as other social post modules. These should actually each be stored per user. This implementation would require a little bit of restructuring, and an updated form element on the user.

✨ Feature request
Status

Postponed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States MegaKeegMan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @MegaKeegMan
  • πŸ‡ΊπŸ‡ΈUnited States MegaKeegMan
  • πŸ‡ΊπŸ‡ΈUnited States MegaKeegMan

    For anyone looking at this, note that I write this issue assuming the completion of https://www.drupal.org/project/social_post_mastodon/issues/3532697 πŸ“Œ Update for Drupal 11 and Social Post 3.x compatibility Active

    That issue fork is essentially being used to update the module architecture to later versions of social post, make it compatible with D11 (per the issue name), but also just to get the module working at all.

    I don't have any plans to actually fulfill this issue request, and may actually shift toward the Social Post X module pattern, where the site actually only supports a single user, so that I don't have to worry about authenticating against Mastodon per Drupal user or worrying about supporting integration with multiple Mastodon api apps. I mostly wrote this for documentation purposes. Though if anyone comes across this and feels strongly one way or the other, do share your use case, and please help out if you are able.

Production build 0.71.5 2024