akirk / enable-mastodon-apps

Allow accessing your WordPress blog with Mastodon clients
https://wordpress.org/plugins/enable-mastodon-apps
GNU General Public License v2.0
34 stars 5 forks source link

Add scope adherence #76

Closed akirk closed 5 months ago

akirk commented 5 months ago

When authorizing an app, we now display the requested scopes on the login screen: Screenshot 2024-02-14 at 14 40 16

Subscopes are displayed like this:

Screenshot 2024-02-14 at 14 40 46

The scopes are now also enforced: If an app then tried to request an api endpoint where it doesn't have permission, and api based error will be returned, for example (screenshot from the Mastodon API Tester):

Screenshot 2024-02-14 at 14 12 06

Thanks @thisismissem for pointing out this missing part of the plugin!

ThisIsMissEm commented 5 months ago

Nice work @akirk ! Had a skim through the code, but I'll leave that to the wordpress experts (not a flavour of php I'm used to)