Skip to main content

Questions tagged [authentication]

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

How to customize WP_Error (REST JWT authentication plugin) [closed]

🔖 Background & Environment WordPress 6.6.2 JWT Authentication plugin 1.3.4 Php 8.3 I'm using the recommended plugin JWT authentication for WP REST API, to authenticate my users. Asking /wp-...
Adrien Villalonga's user avatar
0 votes
2 answers
60 views

Cannot create posts via REST API

I have a Wordpress site hosted by Bluehost, generic web store using WooCommerce and Elementor. I can add and edit products via the WooCommerce API without trouble, but whenever I try to post to the ...
Keagan Hawthorne's user avatar
1 vote
1 answer
72 views

Content being rendered as empty string in posts endpoint

Hi so I'm developing an integration with a customer's Wordpress site so that we can index the site and search across its content for them. However I'm facing some issues while doing this : I am able ...
Sudarshan Sivakumar's user avatar
1 vote
0 answers
13 views

Custom signup redirection to external URL not working

I am using User Registration plugin to register my users. I have created a widget to show a modal with Signup and Login form. I have one more API where the user gets created from this same form. So I ...
nazmul shuvo's user avatar
1 vote
0 answers
25 views

How to secure PDF link when share link to someone?

im trying to secure PDF link when I share the link with someone, below is my functions.php code, function register_download_brochure_menu() { add_menu_page( 'Download Brochure', '...
James Martin's user avatar
0 votes
0 answers
142 views

I am trying to add form using ACF plugin and acf_form() function, but my user fields dont show up properly

I am new at wordpress, so i am very sorry if this is a stupid question, but anyway... I am trying to create form on frontend to add my custom post types with custom fields which i created using ACF ...
Tasha Yan's user avatar
0 votes
0 answers
156 views

Wordpress REST API - Create post not working with 401 response but list posts working

I have used miniOrange API Authentication plugin and configured JWT authentication -> JWT generation using HS256 Encryption. I am able to fetch a token for a wordpress user (which is set as ...
Sandeepan Nath's user avatar
0 votes
0 answers
18 views

WP Crowdfunding login redirect fails

I am using wp crowdfunding plugin for my website but when I create a campaign the campaigns are visible in the dashboard but are not found in the wpcf_list and the another problem is that when I login ...
Abrar's user avatar
  • 1
0 votes
1 answer
106 views

wp_authenticate_username_password not authenticating properly when pass username and password

I am developing custom login page and want to login through username and password. To authenticate user, i am using this function wp_authenticate_username_password() $usr_user = ...
Utkarsh Saxena's user avatar
0 votes
0 answers
55 views

Unable to login with correct password

About a week ago, all users of WordPress site started receiving the login error "Error: The password you entered for the username XXXX is incorrect". I changed to a default theme and ...
gxclarke's user avatar
  • 101
0 votes
0 answers
36 views

regsiter a new user through WordPress API with Google SSO doesn't work properly

I have a code that sends a Google's user data from NodeJS to WordPress and I can see the email registered but first of all it doesn't do auto-login and doesn't set a Name so I just see the email who ...
Mostafa Ezzat's user avatar
0 votes
0 answers
291 views

WP Rest-API response is unauthorized (React)

I am using trying to fetch data from wp to react via rest api. There are two API's I am working upon. First one is wp/v2/pages is working fine (With credentials it is authorized) but, Second api wp/v2/...
Anand Kumar's user avatar
0 votes
1 answer
702 views

How to add additional http header to a wp_error rest response

I'm using the rest_request_before_callbacks filter to check for authorization, more or less similar to this example from the docs // check if authorization header is set if ( ! $request->get_header(...
MediaFormat's user avatar
0 votes
1 answer
61 views

Allow Html pages for users with specific roles

On my website there is, beside my WordPress installation, a folder full of html files. I need to protect them using the WordPress user authentication system. The policy is simple: if you have a role, ...
Manaus's user avatar
  • 101
0 votes
0 answers
30 views

WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates

I'm really new to WordPress and been tasked with this assignment and not sure how to tackle it. So we have a WordPress site and we plan on using the Masteriyo plugin to create and sell online ...
SparklingLemonWater's user avatar
0 votes
1 answer
629 views

Login and register by API

When we install WordPress with Softaculous, a Login button appears and we log in to the site without entering the username and password we pressed. We have a site where we sell digital subscriptions. ...
sakarya's user avatar
  • 222
0 votes
1 answer
188 views

wp_signon by user's login by their particular role

I am using below script to login to users. And redirecting them to their profile page. This is working fine. $user = wp_signon( array( 'user_login' => $_POST['...
Mittul At TechnoBrave's user avatar
1 vote
3 answers
2k views

custom REST endpoints and application passwords

I have created a number of RESTful endpoints via a plugin. To date I have only accessed them from the host site. However I would like to access these endpoints from a sub-domaine(2ed Wordpress ...
dsj's user avatar
  • 63
0 votes
1 answer
83 views

How to authenticate/verify login credentials & check for user meta without logging in?

I have custom login form and i used wp_signon() to authenticate. However, i wanted to run an additional check for usermeta and if the user has account_status === pending, throw an error or or prevent ...
CruzZ's user avatar
  • 11
0 votes
1 answer
548 views

Authenticate + Authorize WP REST API request before built-in WP JSON Schema Payload Validation?

Suppose you register the following endpoint in your application on example.org: register_rest_route( 'sample/v1', '/test', [ [ 'methods' => 'POST', ...
DevelJoe's user avatar
  • 497
1 vote
0 answers
256 views

Blocking the direct access to images in the upload folder WordPress

To prevent direct access for images in upload folder we have following configuration in Nginx configuration: location ~* \.(jpg|jpeg|png|gif)$ { valid_referers example.com https://example.com; ...
DevTeam's user avatar
  • 11
1 vote
0 answers
26 views

REST API Integration without user account?

We have a public WP site, but we want to move/archive legacy content to only be accessible from behind authentication of an existing custom web app (that uses asp.net identity, if it's relevant). ...
LifeOfRoy's user avatar
1 vote
1 answer
222 views

Rest Api Wordpress

I wrote little plugin and I tried to use Rest Api of Wordpress for to communicate admin page to my rest. My problem is : failed rest_cookie_invalid_nonce, return 403 always. My ajax call : const ...
tecnico57's user avatar
0 votes
0 answers
160 views

Cant POST with REST API on WordPress

I'm partially new to wordpress, I want to POST data from postman to wordpress as simple as {"title":"New Rest Post"} using Application Passwords for auth. When trying on local wp (...
Rafal's user avatar
  • 1
0 votes
1 answer
355 views

Multiple issues with Ajax login function due to browsers and cookies

Using basic usage of ajax login wordpress, no cookie wordpress_logged_in_ are created on safari and Chrome and firefox doesn't read user when cookie "wordpress_logged_in". I have several ...
imagIne's user avatar
  • 105
9 votes
1 answer
4k views

Why does hashing a password result in different hashes, each time?

if I hash the same plain-text multiple times, it returns different hash strings: $x = 'asdf'; echo wp_hash_password( $x ).'<BR>'; echo wp_hash_password( $x ).'<BR>'; echo wp_hash_password( ...
Doug Cassidy's user avatar
0 votes
1 answer
87 views

How do you manage your pages or functions that require logged-in users?

I'm having more functions and pages that require my users to be logged-in. Below is what I have in each of my functions, kind of a hassle to keep repeating this code. $user_id = get_current_user_id(); ...
ratib90486's user avatar
2 votes
0 answers
646 views

Log in user using Wordpress REST API

I am having problems authenticating a user after logging in using a custom endpoint using the WordPress REST API. I'm aware that this is not the perfect approach but I am just trying to make a few ...
Courtney's user avatar
  • 163
2 votes
0 answers
822 views

Rest API code to get ID of current user not working: get_current_user_id() gives 0

Background I am trying to write Rest API code to get the ID of the user who triggers the function in question. I found a fantastic answer to this exact question, that was very kindly provided by user ...
Appguy1's user avatar
  • 21
0 votes
1 answer
369 views

Authenticate Subdomain

I have a sub-domain which I'm trying to restrict to authenticated Wordpress users but the authentication isn't working. I've tried the following code: global $current_user; wp_get_current_user(); if ...
TomC's user avatar
  • 1,316
0 votes
0 answers
483 views

How to create new users with JWT Auth Plugin?

I'm trying to build an application using ReactJS and Wordpress Rest Api. I'm using JWT Auth Plugin and it works great but if I try to create a new user without being logged I get this error below: { ...
Marcus Freitas's user avatar
0 votes
0 answers
75 views

How to verify which WordPress user requested the API in ASP .NET Core?

I have a use-case where I have a WordPress site and an ASP .NET Core as a Restful API backend. I use the WordPress site entire for Frontend, CMS, and User Authentication. On certain pages of my ...
user2672399's user avatar
0 votes
1 answer
37 views

Mirgrating a user at signon

I am migrating a wordpress site to another site. The users from the old site need to work with the new site. I am doing a staggered implementation, so do not want to bring all the users over at once. ...
StripyTiger's user avatar
1 vote
1 answer
567 views

homepage redirects to login page when user session expires

WordPress 5.9 Users trying to access the homepage when the session expires, are sent to re-authenticate. The behavior seems weird since it only applies to the homepage. Users with expired sessions can ...
m1k3y3's user avatar
  • 115
0 votes
1 answer
802 views

Getting 401 from ajax using an application password

Got the following code running on a local wordpress install. I have created an application password for the admin user but am still getting a 401 unauthorised. What am i missing? Here's the code ...
Codescribler's user avatar
-1 votes
1 answer
42 views

Connect my WordPress site users to my public site account without showing my public site credentials

I have WordPress website and I want my site's users to connect any another public website's account using my public account's credentials without showing them to my credentials. I explain more with an ...
Hari Health Care's user avatar
0 votes
0 answers
210 views

Decode and Decrypt Azure B2C OpenID Authorization Token, Use Response in API Call (Example Token Within)

I have been provided with a working Azure AD B2C application, and my goal is to use it to facilitate a means of access control to particular content. Using that application URL, a successful login/...
bleedsblue2190's user avatar
0 votes
1 answer
651 views

How to connect android app with Wordpress website?

after a lot of search on the internet I found that to connect an android application with a wordpress website I have to use JSON API. In my website users are able to register or login to their unique ...
Gus Rasmusen's user avatar
0 votes
1 answer
66 views

Requiring Authentication for Parts of Wordpress Site

I have a site that I've inherited and my user base is requesting a feature. The page is primarily informational about a non-profit (calendar of events, contact form, etc.) but they'd like to add a ...
tommy_o's user avatar
  • 101
1 vote
1 answer
3k views

New user form rejected because "passwords don't match"—but there's only one password field

I am trying to add a user to a blog of writings by or about my late father.  One of the articles is by my niece, but I cannot add her as a user.  The admin form only has one field for password, but ...
WGroleau's user avatar
  • 115
1 vote
1 answer
683 views

Hooking into 'authenticate' causes login to submit on page load

I added a filter for the 'autnenticate' hook to apply some additional login verification, but if I change the filter priority to 20, the filter seems to be firing on wp-login page load even if the ...
Victor's user avatar
  • 111
0 votes
0 answers
228 views

Change auth_cookie_expiration for specific roles and specific login times

In my db i have a login counter that keeps a number value as a record (1,2,3,4,5...)every time a user from a specific role logins. I am trying to change the auth_cookie_expiration to 1 day for ...
Honoluluman's user avatar
0 votes
0 answers
26 views

How to store a secret for a plugin inside public_html

My friend has a Wordpress site, I have a django server. I am trying to talk to his Wordpress site custom endpoints of the REST API, and do priviledged activities like create and unpublish posts. I am ...
run_the_race's user avatar
0 votes
1 answer
243 views

Wordpress REST API calls that depend on the Wordpress User

I have a Wordpress site, and I have another server. People login into the wordpress site, then at a later stage browse the other server. On the other server page, there are JS fetch requests getting ...
run_the_race's user avatar
0 votes
0 answers
103 views

Secure WordPress API, how?

I'm writing a plugin that expose a custom resource via WordPress API's. Now the resource is public so anyone knows the API's endpoint can get the resource but I would to secure it, what's the best ...
icolumbro's user avatar
0 votes
1 answer
262 views

create pages automatically and dynamically in wordPress

Is there an easy way to create pages automatically and dynamically in wordPress? Let me explain further: I am developing a website where I have more than 20 equal pages, with the same layout, where ...
nosperov's user avatar
1 vote
0 answers
808 views

How to save generated JWT token to cookies on login?

I'm developing a Chrome extension and I want my users to authenticate via my WP login page. I configured JWT Authentication for WP Rest API. I want the users to go to my website, login, and then have ...
amiregelz's user avatar
  • 111
0 votes
0 answers
207 views

How to allow access based on the user meta flag

I want to check user meta data and allow access. where I am inserting user_status in wp_usermeta table at the time of Registration. How to validate/verify meta value with password for login. Here is ...
sridharnetha's user avatar
0 votes
0 answers
344 views

Authentication between two different sites using the WordPress login cookie

Two different WordPress, two different users, same account and password. In this case, if the user wants to go to (A -> B) the B site after logging in to the A site, the session HASH is already ...
Pelmi's user avatar
  • 3
0 votes
1 answer
124 views

Login cookies blocked after customizing hashing method

I get the following error when trying to login: Error: Cookies are blocked due to unexpected output. I customized the wordpress core functions wp_hash_password() and wp_check_password() to use SHA1 ...
Jan's user avatar
  • 3

1
2 3 4 5
7