Questions tagged [authentication]

The tag has no usage guidance.

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

How to modify username before logging in?

I know a solution exists for Wordpress admin from this Stack Exchange question: Change username before login However, while this works for logging into Wordpress directly, I am trying to use it for ...
Harish Prabhakar's user avatar
0 votes
0 answers
21 views

WordPress JWT Authentication

Can you give me an idea of how can i implement WordPress JWT in the below problem statement? I need to add JWT Authentication to my WordPress website. We are developing an external app that needs to ...
Md. Mahabur Rahman Nadim's user avatar
0 votes
0 answers
29 views

Restricting access to non logged in users

im trying to create a user flow where, when a non-logged-in user tries to access my website, I want them to see an entry page with links to the login and registration pages, but I don't want them to ...
onlyoreoo's user avatar
0 votes
0 answers
86 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
272 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
35 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
18 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
0 answers
34 views

Not able to set userId and email at wp_set_current_user in Worpdress

I am trying to create a plugin where user can login using our platform where we have login with google and other options. I want to override worpdress login system. So I am trying to set userId and ...
Saurabh's user avatar
0 votes
1 answer
297 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
77 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
0 votes
2 answers
396 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
  • 53
0 votes
0 answers
165 views

wordpress rest api authentication failed

I wanted to upload an canvas element as image to wordpress with rest api, i found following error, "rest_cannot_create" data : {status: 401} message : "Sorry, you are not allowed to ...
Safayet hossain's user avatar
0 votes
1 answer
45 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
0 answers
193 views

Wordpress Network / Multisite login to one site allow access to all

I have a wordpress installation that uses wordpress network (which I think was previously known as Wordpress Multisite). I have the following sites setup, http://www.example.com/uk http://www.example....
sico87's user avatar
  • 209
0 votes
1 answer
300 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
  • 487
1 vote
0 answers
91 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
23 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
95 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
56 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
268 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
  • 41
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
43 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
1 vote
0 answers
512 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
  • 153
1 vote
0 answers
538 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
  • 11
0 votes
1 answer
222 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,281
0 votes
0 answers
373 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
68 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
31 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
372 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
570 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
41 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
150 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
375 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
43 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
506 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
179 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
24 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
219 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
48 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
125 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
664 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
166 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
289 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
110 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
0 votes
0 answers
190 views

How to make conditional statement in WpBakery (formarly Visual Composer)

I am building a new membership website with WordPress using WpBakery (formally visual composer). I created a heading text which I linked to my login page, everything works fine but the problem is that ...
Ruby's user avatar
  • 1
0 votes
0 answers
33 views

Application to Website authentication

I'm new to Wordpress. I'm working on an application that takes in user information and checks it on my website. If the user exists, continue, else, Quit. I know this is possible with REST api but use ...
Lynx's user avatar
  • 1
1 vote
0 answers
28 views

how to oauth1 Wp plug-in revoke/reset.?

Am using this plugin to gives access to a app-backend dashboard for android/iOS apps. I authorized it and every thing was fine but apps were not working so for troubleshooting I generated another ...
Sandeep's user avatar
  • 11
0 votes
1 answer
528 views

wp_nonce vs jwt

I’ve recently added jwt authentication to my website because frontend of my site is completely decoupled from backend. What I haven’t thought of is that I could use wp_nonce instead of jwt - create ...
user avatar
0 votes
2 answers
429 views

Force REST API Authentication for each request method

WordPress end points default rules, GET ----> PUBLIC POST, PUT, DELETE ----> AUTH How can I force authentication the WordPress REST API GET method requests?
km onur's user avatar
  • 109

1
2 3 4 5
7