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?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0