+ plug(OAuthScopesPlug, %{scopes: ["write:accounts"]} when action == :put_settings)
+
+ # Note: :index action handles attempt of unauthenticated access to private instance with redirect
+ plug(
+ OAuthScopesPlug,
+ %{scopes: ["read"], fallback: :proceed_unauthenticated, skip_instance_privacy_check: true}
+ when action == :index
+ )
+
+ plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug when action != :index)
+