Question

So I have this site running under ssl (on siteground).

The site is new, the instalation has no more than 2 weeks.

I have a working desktop app to connect to my sites, using jwt tokens, but the plugins for this token are old and has not being tested with newer WP versions. So to keep everything up to date, I want to change to this kind of auth.

But when I try my site, using get over the rest-api, I don´t get the authentication key according to this.

So I think that app passwords are not enable by default.

If that is the case, according to that page, I have to add:

add_filter( 'wp_is_application_passwords_available', '__return_true' );

somewhere, but I don´t know where to add it.

Or is this something else I have to be cheking?

Was it helpful?

Solution

If you want to add that single filter, you can do it in your theme's functions.php file. If you'd prefer to keep it out of the theme, you can make it a simple Must Use Plugin. Make a file like wp-content/mu-plugins/enable-application-passwords.php with this file content:

<?php
/**
 * Plugin Name: Enable Application Passwords
 * Description: A simple plugin that enables application passwords.
 */

add_filter( 'wp_is_application_passwords_available', '__return_true' );

This plugin will load automatically with WordPress.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top