A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [authentication]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

How to use Azure AD for authentication?

What is the best method to authenticate users against Azure AD when trying to access WP? Doing some search I have come across sites like: https://wordpress.org/plugins/sso-with-azure-ad/ . https://...
0
votes
1answer
20 views

Access to customer profile with pin code

I am trying to achieve the following Customer has their profile page and can edit it etc I would like anyone with the URL to view a customers profile details by entering a pin code (prompted) after ...
1
vote
1answer
42 views

WordPress custom authentication implementation

I created a plugin to allow my website to have its own login functionality. My project has a new requirement which is to log in to the user with my own authentication method and not the one provided ...
3
votes
0answers
60 views

How to authenticate custom API endpoint in WooCommerce

I have created custom API, which is working fine, but I am not able to authenticate it, it returns result without checking for keys I have created consumer key and secret key from admin. How to ...
3
votes
2answers
29 views

How to assign user a role if none is present when logging in

I currently have a front end part of a WP site that allows admins to create new users and assign then user roles from a drop down - that works perfectly. However, I am using a plugin to also ...
1
vote
0answers
25 views

REST API: best place to set current user for JWT auth?

I've studied a couple of JWT auth plugins and notice the current user is being set in either the rest_api_init action: add_action( 'rest_api_init', function () { wp_set_current_user($token->...
2
votes
0answers
23 views

WordPress SSO with MemberPress

I've built an app using React. To authenticate users I am using a custom database with Auth0. My client is using https://memberpress.com/ to handle subscriptions for multiple things, the app, a forum,...
0
votes
0answers
14 views

How can I port class-phpass.php in Java?

I have a Java app that needs to check with a Wordpress MariaDB database for usernames and passwords. To do authentication into the WP framework, I need the password hashing for Wordpress; my app is ...
0
votes
0answers
55 views

Basic Auth .htaccess on wp-login, but allow logout from woocommerce

I use a .htaccess basic auth on my WC site to help prevent hackers accessing wp-login, which works well... except with WooCommerce if a logged in customer wants to logout from their account - upon ...
2
votes
1answer
78 views

Outgoing proxy connection problem

I'm trying to set up Wordpress on a server that requires a proxy connection to connect to the internet. Here's what I put in wp-config.php: /* Configure HTTP Proxy Server */ define('WP_PROXY_HOST', '...
2
votes
0answers
60 views

Limit REST API output to current logged in user that is also author of the content

https://developer.wordpress.org/rest-api/using-the-rest-api/frequently-asked-questions/#require-authentication-for-all-requests This requires authentication for all reque​sts. add_filter( '...
0
votes
0answers
18 views

How to logout remotely from other website

My requirement is something like: Let's say I have a client side app/website. There will be logout link and on clicking Logout link, it will also remotely logout wordpress site. I believe WP has a ...
0
votes
0answers
23 views

User login based on third party API

I am about to create a member site. I have all login credentials and user data in a external REST API. I want to use WordPress as the core to let the users login with their e-mail and password and ...
0
votes
1answer
28 views

Wordpress HTTP API NTLM Authentication

I was wondering if anyone has had to use NTLM authentication when using wp_remote_get? Trying to authenticate using Basic but that is returning the proxy error. When I use other authenticators for ...
0
votes
0answers
11 views

Is identity impersonation by cookie the go-to when trying to gain fast access in WordPress?

I'm trying to write a system that would allow me to access a WordPress website if the administrator chooses to share a link with me. That link, GPG-signed are his cookies, that I can then use to hit ...
1
vote
0answers
45 views

Create Session with JWT

I'm currently working on a shop like project that uses React as frontend and Wordpress with Woocommerce as a backend. To authenticate with the API I use the JWT Authentication for WP REST API, which ...
0
votes
0answers
11 views

htaccess authentication on a Wordpress/Woocommerce site = trouble for users

To begin with, you should know that I'm a copy and paste guy. When it comes to regular expressions, to me it means someone isn't smiling or angry looking; they just have a regular expression. So, I ...
0
votes
1answer
92 views

Rest API: wp_verify_nonce() fails despite receiving correct nonce value

I am generating a nonce to be used with client side fetch requests to the rest api: function prepAllAdminScripts() { wp_register_script( 'reactAdminArea' , PLUGIN_FOLDER_URL . 'shared/...
1
vote
1answer
41 views

current_user_can('administrator') returns false when I'm logged in

protected function isAdmin() : bool { $check = current_user_can('administrator'); return $check; // returns false as I am logged in as superadmin, refreshing the page for xdebug to run }...
0
votes
1answer
291 views

Authenticating with REST API

I have tried every which way to authenticate a post request. WP User Plugin - As per the docs, I've logged in at wp-json/wpuser/v1/user/login and received my token. I've passed that token as a header ...
1
vote
0answers
158 views

Blocks Rest API rest_cannot_delete

I'm trying to make a Postman call to the Wordpress API to delete a block. However, I keep getting a 403. This user is used to add and delete pages, tags, and posts just fine using the Application ...
0
votes
1answer
187 views

WooCommerce OAuth 1.0 + JWT authentication with JS/React

My scenario: JWT auth for user queries, which requires to customize .htaccess to recognize the Bearer Authorization header OAuth 1.0a for system queries, and because of .htaccess customization the ...
0
votes
1answer
266 views

Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?

From what I have tried and tested so far, the getters and setters do not work inside the function permission_callback. The alternate way would be to throw a custom 401 from the callback itself. Is ...
2
votes
1answer
196 views

Rest API authentication issue when called from fetch request in bundle.js

I'm able to use the Rest API for calls that don't need auth, but I'm having an auth issue for the routes that require it. Here is part of a .php view template for an admin page: <div id="...
0
votes
1answer
113 views

Advanced Access Manager: RESTful endpoint to refresh token

I'm using Advanced Access Manager (AAM) plugin, and have been trying to refresh a still valid JWT token using the /aam/v1/refresh-jwt RESTful endpoing, however I’m getting the following error: “...
0
votes
0answers
23 views

get original request_url (before redirect)

I have a wordpress page and want to add basic auth to the page, except for the wordpress rest api! The main problem seems to be the redirect that happens in the standard .htaccess of wordpress. ...
0
votes
0answers
30 views

External requests to authenticate Wordpress Rest API, with a private secret key

I want to validate the Wordpress Rest API for requests from two different domains. Wordpress, Cookie or O-auth methods can be verified. But it is impossible to accept external requests with Cookie. ...
0
votes
0answers
24 views

how to add security questions on wp-registration page and validate it

I wanted to validate security questions which show's on wp-login page validation is if answers are blank user cant login and if user register with 2 questions and admin change no. question show on ...
0
votes
0answers
159 views

How can I secure my custom rest api endpoint or add under a already existing rest group

Creating a custom REST Endpoint I search a way to secure the route with JWT or integrate my endpoint under Woocommerce rest routes which already has an authentication logic. The perfect solution for ...
0
votes
1answer
16 views

How can I upload and password protect Javadocs in Wordpress?

I'm trying to host our software's Javadocs online behind a paywall. We tried to render the docs in Wordpress, which failed (obviously). My theory is that we could upload a folder directly to our root ...
0
votes
0answers
91 views

Troubleshooting logging into the backend (wp-admin)

I have a Wordpress website on a cloud plan at Siteground. I switched the website to WPML recently. Since then, my main user (the blog author) has been unable to log into the website backend (wp-admin) ...
0
votes
0answers
22 views

Network per-site authentication

Can I use WordPress multisite but have a per site users table, like this: https://core.trac.wordpress.org/ticket/15467 It seems I could use CUSTOM_USER_TABLE right? What would be the easiest way to ...
3
votes
0answers
168 views

Wordpress REST API “rest_authentication_errors” doesn't work external queries?

Wordpress REST API "rest_authentication_errors" doesn't work external queries? I was using following experimental codes for experimental purposes. add_filter('rest_authentication_errors', 'auth'); ...
0
votes
0answers
27 views

JWT Authorization Exposing Login Credentials?

I want to start using JWT to access an API endpoint that needs to be protected. There will be no logged in user, as this will be an HTTP call coming from a Vue frontend running on the same server. ...
2
votes
2answers
575 views

WordPress Rest API: How do we validate with our custom API key?

How we can verify "Cancel the header auth" the "endpoint" functions of WordPress with an API key that we produce. (Note: not a different endpoint, original endpoints) I have my own "Crypto" class/...
0
votes
0answers
40 views

Make authorization mandatory on custom routes

I'm setting up multiple custom api routes in my wordpress theme and I would like that to require a JWT token to access. So I have followed the steps in order to get the JWT Authentication for WP Rest ...
0
votes
0answers
24 views

Extend Cookie with auth_cookie_expiration not working

I was trying to extend the Login Cookie with the following Code function expiration_filter($seconds, $user_id, $remember){ //if "remember me" is checked; if ( $remember ) { //WP ...
0
votes
0answers
37 views

After upgrading to WP 5.1.1 sometimes I need to reauth infinitively

I have some blogs, and after upgrading to 5.1.1 I always have to reauth myself. If password/username is wrong, I got that error message but if I enter right data, the page simply reloads. So I go to: ...
0
votes
0answers
190 views

Authenticate my WordPress Plugin Client via OAuth2 “Authorization Code Grant”

I am about to create a WordPress Plugin with Client functionality. I basically want to post wordpress-data to a remote server using the servers REST-API (short overview: I want to simultaneously add ...
2
votes
1answer
2k views

How to Authenticate WP REST API with JWT Authentication using Fetch API

My goal is to send user comments with a POST request from a server-side Lambda function to my WordPress API. I'm using Gatsby and Netlify. When someone leaves a comment in the comment form of my ...
0
votes
0answers
151 views

auth error with react native and wordpress rest api jwt token

I am trying to user wordpress rest api with jwt token and react native but I have issues debugging with postman; jwt/token returns the token, and the user display, etc. jwt/token/validate returns ...
0
votes
0answers
626 views

get token using the 'WordPress REST API with JWT Authentication' plugin

I'm trying to build a Wordpress plugin that is an API which can be queried from remote websites. I want to secure it with JWT web tokens, so I did install the JWT Authentication for WP REST API ...
1
vote
0answers
34 views

How can I force the user to log in, even if they're already authenticated?

I am creating a link to a Wordpress page. In this scenario, multiple users may use the same machine and get confused about who is logged in, so every time they follow the link they must be forced to ...
0
votes
1answer
110 views

PHP: authenticate for a REST request?

I did create some custom endpoints for a plugin i'm working on, with the REST api. It works quite well, but now I would like to secure those requests : I don't want external users (EDIT: I mean remote ...
0
votes
0answers
16 views

Block unauthenticated users from downloading png (or other data) files

How can I block users from direct downloading image files ( if they are not authenticated)? I want to enable download just when user pass authentication header (JWT). Currently I have JWT enabled for ...
0
votes
0answers
121 views

Use Token-based Authentication in Contact Form 7 instead of using Basic auth

I am using a WordPress version of 5.0.3, I installed the Contact form 7 to API + Basic auth plugin for the purpose of passing the JSON data to our API. Can we have any support or ideas to implement ...
0
votes
1answer
348 views

Invalid key on activation and password reset

I am in a pickle now, about to release a Wordpress-based app and I can't get the registration complete because of the freaking password set/reset key is sometimes invalid. I say sometimes because ...
2
votes
0answers
384 views

How to extend expiry time of jwt wordpress token?

I am making Hybrid app with WordPress database in php, I am using JWT WordPress plugin to authenticate users. But token is expiring in almost 20 minutes, I am using following code to extend the expiry ...
1
vote
1answer
59 views

Authenticate a user for current request

Is there a way for a WordPress plugin to authenticate a user for the current request? My plan is to authenticate users via a HTTP header containing username and password. Then this information should ...
0
votes
1answer
609 views

JWT on Woocommerce cannot work with “Customer” role user

I developing mobile apps, that connect directly to woocommerce rest api. I use this plugin for authenticating, like registering, login, make an order, etc. So the issue come, when I register new user ...