Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [authentication]

The tag has no usage guidance.

0
votes
0answers
15 views

Stay logged in with Google Account

I'm currently writing a plugin where users are able to login with Google for seeing their YouTube feed in WordPress backend. I can log in to Google, save the userdata into my database but if I'm ...
0
votes
0answers
12 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
12 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
15 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 ...
0
votes
0answers
27 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
19 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
0answers
32 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 ...
0
votes
1answer
26 views

How to enforce authentication for all resources?

I want to host a personal journal with wordpress. I don't want to share it with 3rd parties but I want to be able to access it from anywhere with my admin credentials. There are several plugins ...
1
vote
1answer
25 views

Auth cookie value security risk?

A short question this time: How much of a security risk is it when an third party gets access to WordPress auth cookie? Can they for example simply copy the cookie and "be" logged in as the user who ...
0
votes
2answers
17 views

WP link for reset password is not received

I used my existing password but that did not work. So I asked for a new password. Your Email, with your link, has not been sent
0
votes
1answer
12 views

Disable emails for new user registration

I want to disable the default email that is send when user is registered. I am using this plugin for email verification User Verification By PickPlugins, which sends an email with confirmation link, ...
0
votes
0answers
16 views

How do I make WordPress use different database for passwords? [duplicate]

I have a website built with PHP and HTML I made a sub-directory and install WordPress on it. My problem is users should register twice on WordPress and on my php website. What I want is to make ...
0
votes
1answer
25 views

How can cookie/session authentication be used in wp-json fetch request?

I've written a /wp-json path like: add_action( 'rest_api_init', function () { register_rest_route( 'myplugin', 'foo', array( 'methods' => 'GET', 'callback' => function( $data ) { ...
0
votes
0answers
11 views

Using WooCommerce account to my other website

I'm is selling online trainings using WooCommerce store. When the client buys the item, he's given an unique key, which he can use to start new training on a dedicated training website (another ...
0
votes
1answer
42 views

Check for empty username or password on login

I'm building a custom login page for clients and wish to keep the wp-login page for site administrators. For checking for empty fields I'm using the code: function verify_user_pass($user, $username, ...
3
votes
0answers
141 views

WordPress REST API call generates nonce twice on every call

I'm trying to login a user via the REST API, and then retrieve the current user on subsequent requests. As per the documentation, in my plugin, I am creating and retrieving a nonce after a successful ...
0
votes
0answers
8 views

Wordpress external autentication

I have question about autentication. I have external aplication (with login form) for autentication users, it is not wordpress. Other apps use this application, it is SSO. Now I needed to change ...
3
votes
0answers
316 views

WordPress “Link has expired” error on updating posts

I'm maintaining a WordPress site on GoDaddy for a client and they started to get the "this link has expired error" when they saved a post. It does not happen when I upload a file. However, I am ...
0
votes
0answers
25 views

Cannot access wp-admin but can authenticate frontend login

I have a custom function which is based off the wp_login_form(). I copied the function and essentially wrote it to add in two new fields to validate against - "mbjbookdomain" and "mbjbookreference". ...
0
votes
0answers
8 views

HTTP API: Request a page as authenticated user

Suppose i need to perform a HTTP request to a page inside my Wordpress itself, but i want it to be available only if actual user can manage options. It is basically a version of any page, with some ...
0
votes
0answers
29 views

Custom Login Integration not working in wordpress anymore

I have added a script in my functions.php file which checks a second custom database within the WordPress database when a member tries to login. This script was working correctly in the past and I ...
0
votes
1answer
333 views

Calling an API to do authentication / user login

I'm relatively new to wordpress and am working on a customized site. I have an API endpoint that I'd like to call to do authentication, because our users are going to have their credentials stored/...
0
votes
0answers
22 views

Add “edit” link to third-party application pages

I'm in the process migrating the WP theme to use a third-party client (JS web application). I'd like for people who are editing content to be able to easily click a link to go to edit the page. ...
0
votes
1answer
56 views

WordPress user Authentication

I am currently working on a plugin using WordPress. I created a register page that allow users to register, this information is then stored in custom database table called finusers. This is what I ...
0
votes
1answer
702 views

Rest API basic auth not working

I've setup a basic auth for quick testing a site. $headers = array ( 'Authorization' => 'Basic ' . base64_encode( 'admin' . ':' . 'Str0nGP@$$w0rd' ), ); $url = rest_url( 'wp/v2/posts/1' ); $...
1
vote
0answers
42 views

Wordpress + REST API v2 and private pages Load by slug

Im creating WP theme based on VUE, anyway I load pages based on slug - no by ID. I use base X-WP-Nonce header authentication, it working well with revision etc. So now I have a private page and my ...
0
votes
1answer
280 views

Possibility to login without password

I'm creating a webapplication for users that are racing in a rally. I have the following data from the different racers: Username Password Mobile phone Email The problem is they never know their ...
0
votes
0answers
436 views

Why does permission_callback not ovverride authentication?

I created a custome REST API endpoint for my WP instance, and upon reading the docs, they say that if you return true for the permission_callback function, that this will bypass the authentication ...
1
vote
1answer
47 views

implement authentication and authorization to user

i want to get authentication to my website like to be the page with name and password as a file reference to log in as visitor with detected authorization to each person want to visit the website how ...
0
votes
1answer
23 views

is_user_logged_in() returns different values on different pages

On most of my site, is_user_logged_in() works perfectly. On two pages with similar custom templates set, this incorrectly returns FALSE. The user can navigate back to other pages where it works ...
0
votes
0answers
12 views

To enter comment as a logged in user in my app

I have developed an app in ionic in which I am retrieving posts from my WordPress site. Now I want my registered users in the app to be able to post comments in the posts on Wordpress site without ...
1
vote
0answers
63 views

Add basic authentication of WordPress on any external PHP file?

I have a file named upload.php that is an API which does the job of uploading images to the server. I want that file to have a basic authentication of WordPress, so that while accessing that php from ...
0
votes
1answer
78 views

Securely log in a user without a password using a link?

I'd like to use links from my application to log users into Wordpress in their browser, but I'm concerned about whether this can be done securely. Obviously using any sort of static URL pattern seems ...
0
votes
0answers
12 views

How can I use the same fields for two different forms?

I'm trying to combine the login and register forms on a WooCommerce/WordPress site. The idea is that a single set of fields, username and password, could be submitted by two different forms. The first ...
0
votes
1answer
92 views

Authenticating users with usermeta fields

I have a working site where users are logging into using their email/username and password. Every user has a usermeta field with an unique code. I have to modify the login page in order to let them ...
0
votes
1answer
1k views

authentication issue with rest api - rest_cannot_create

I am using the rest api in Wordpress. For authentication I use the Basic authentication plugin (JSON Basic Authentication) I use this request (from both postman and nodejs): POST /wp-json/wp/v2/...
0
votes
0answers
90 views

Make REST API accessible to the public

My Wordpress site's API is currently set to private. Here is the link. How do I make it publicly accessible so the user doesn't have to be authenticated in order to access all of site's data via REST ...
0
votes
1answer
19 views

Secruity Questions on a timer

I am doing some research for a project and one requirement from the client is that to create an account a user must create security questions on account creation. I think this should be easy with a ...
3
votes
3answers
232 views

How to check WordPress website username and password is correct

On my site i have one form for client to submit their WordPress site details. On that form containing these fields WordPress admin url, username, and password. I want to check their login details are ...
14
votes
2answers
8k views

How to: Make JWT-authenticated requests to the Wordpress API

This is not really a question but a guide on how to make authenticated requests to the Wordpress API using JWT. I'm writing this as a reminder to myself and for those who may need some help with the ...
1
vote
0answers
86 views

How do I execute a wp_remote_get call using NTLM authentication?

I need to use ntlm authentication for a remote call, and I'm not sure how to configure the wp_remote_get call to do so. I have used wp_remote_get successfully in other situations without NTLM by ...
0
votes
1answer
223 views

Register rest field authentication with REST API

I'm trying to add some user meta information to the existing wp/v2/users REST endpoint. However, it looks like additional authentication is required, i.e. I get this (output in comments): ...
0
votes
1answer
291 views

Why does Wordpress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]

After login with Firefox to Wordpress website as non admin user, 3 cookies are set: wordpress_logged_in_... wordpress_sec_... for path /wp-admin wordpress_sec_... for path /wp-content/plugins Why ...
1
vote
2answers
321 views

Configuring WordPress Auth Cookie Expiration

I'm trying to configure the WordPress cookie expiration time, but for some reason it's not working. I went here: https://developer.wordpress.org/reference/hooks/auth_cookie_expiration/ And put the ...
4
votes
3answers
81 views

Log in from one wordpress website to another wordpress website

My client explicitly does not want to use 'multisite' wordpress option. My client has a main site and 199 sub sites (other domains). A user has usermeta with meta key: branch_id As an example (...
0
votes
1answer
461 views

wp_authenticate but not logged in

I am pretty new to all things Wordpress and seem to be really confused by what I have read. What I am doing is creating a plugin for a specific job and I need to simply change the menu once logged in....
0
votes
0answers
42 views

Random authentication failures on a load balanced WP setup

1 Wordpress instance I have a wordpress setup on one EC2 with a MySQL DB on another server. This setup works fine for both the blog access and wp-admin. 2 Wordpress instances I repeat a similar ...
0
votes
1answer
663 views

How can I authenticate user credentials against a Wordpress instance?

I am running a second web application in addition to Wordpress/WooCommerce. When users log into the second application, I'd like to authenticate them against the WP instance. I am using the REST API ...
0
votes
2answers
2k views

Can I authenticate with both WooCommerce consumer key and JWT?

I want to authenticate against both: the WooCommerce consumer key, for system queries and JSON Web Tokens (JWT), for user queries I have installed JWT Authentication for WP REST API. But after ...
2
votes
1answer
943 views

How to login to WordPress site using basic authentication HTTP headers?

I'm looking to run some of my automated acceptance tests as a logged in user. My acceptance tests are run using Ghost Inspector which can send basic authentication headers. There is a basic ...