Questions tagged [authentication]

The tag has no usage guidance.

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

REST API - Authentication/Logon security

I have done a simple tool in the wp-backend with the RESTAPI about a year ago. Works as it should. Now the customer want this tool to be called from a subdomain and with credentials. So other users ...
  • 101
0 votes
1 answer
23 views

Properly process a custom WP REST API request (Authenticate, Authorize + Validate)?

Suppose you register the following endpoint in your application on example.org: register_rest_route( 'sample/v1', '/test', [ [ 'methods' => 'POST', ...
  • 401
0 votes
0 answers
45 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; ...
0 votes
0 answers
18 views

WP REST API with Basic Auth at target website

What I want to establish I want to create a custom post from an external website using WP REST API. The target website (where the post should be created) is protected with basic auth. What I have done ...
  • 1
1 vote
0 answers
17 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). ...
0 votes
1 answer
44 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 ...
0 votes
0 answers
20 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 (...
  • 1
0 votes
1 answer
62 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 ...
  • 11
9 votes
1 answer
3k 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( ...
0 votes
1 answer
33 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(); ...
0 votes
0 answers
7 views

Orginization Login for Wordpress [duplicate]

I am trying to set up a log in system for my website. My main issue is that there is an already established login system I am required to use. Basically, I need my page to redirect to my organizations ...
user avatar
0 votes
0 answers
133 views

Working Around rest_forbidden_context

I am trying to request page content, but the raw page content, calling this route: "/wp-json/wp/v2/pages/" + id + "?context=edit" In response to this I get: code: "...
  • 101
1 vote
0 answers
204 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 ...
  • 153
1 vote
0 answers
212 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 ...
  • 11
0 votes
0 answers
39 views

Authenticate user using Hashed Password in MySQL Query and C#

I am writing a custom component in C# that connects to WordPress database at backend. I am trying to authenticate users via Mysql select query but the hash is not matching. I have tried the answers ...
  • 157
0 votes
1 answer
47 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 ...
  • 1,261
0 votes
0 answers
178 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: { ...
0 votes
0 answers
37 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 ...
0 votes
0 answers
22 views

Uploading attachment (pdf) and prevent download for anonymous user

I have a website which is public available and there we have "internal" area, these are simply pages with the visibility set to protected. So wordpress ask the visitor for the password (the ...
  • 1
0 votes
1 answer
26 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. ...
1 vote
1 answer
148 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 ...
  • 115
0 votes
1 answer
191 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 ...
-1 votes
1 answer
39 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 ...
0 votes
0 answers
64 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/...
0 votes
1 answer
129 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 ...
0 votes
1 answer
29 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 ...
  • 101
1 vote
1 answer
2k 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 ...
  • 115
1 vote
1 answer
234 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 ...
  • 111
0 votes
0 answers
133 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 ...
0 votes
0 answers
18 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 ...
0 votes
1 answer
179 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 ...
0 votes
0 answers
33 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 ...
0 votes
1 answer
44 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 ...
1 vote
0 answers
429 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 ...
  • 111
0 votes
0 answers
80 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 ...
0 votes
0 answers
133 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 ...
  • 3
0 votes
1 answer
61 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 ...
  • 3
0 votes
0 answers
95 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 ...
  • 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 ...
  • 1
1 vote
0 answers
25 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 ...
  • 11
0 votes
1 answer
349 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
132 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?
  • 109
1 vote
1 answer
156 views

SSO autologin Wordpress + Ajax

That one keeps me awake at night. The problem is that the user is properly logging in, but AFTER page refresh and should be immediately logged in without page reload. Need a fresh eyes to look at it. ...
1 vote
1 answer
142 views

how to send Ajax request in wordpress backend

On the fronted the wp_localize_script seems to be working as when I view the source I can see the nonce. wp_localize_script('scripts', 'myAjax', array( 'root_url' => get_site_url(), '...
0 votes
1 answer
472 views

register/login api

I have been looking all over google and all I can find is fairly old plugins that appear outdated in assisting with an API registration/login. Basically, I have a mobile app that needs to get data ...
  • 105
1 vote
1 answer
53 views

How do I get WordPress login to ignore the password input if a particular username is used?

I am trying to build a login where users with an account number as their username can login without a password or email. When the user clicks login, if the username that has been input exists in the ...
  • 11
0 votes
0 answers
87 views

Use WP cookie to authentificate user on an external app

Is it possible to authentificate a logged in WP user by it's wp auth cookie from an external app (simple JS webapp on a different domain)? The setup is: My webapp is on domain.com/generator/ The ...
  • 1
0 votes
0 answers
77 views

How to post frontend login form to a different authentication script from wp-login?

I would like to separate my front-end login from back-end login, but the front-end login will use oAuth-based third-party authentication whereas the back-end will continue to use the WordPress ...
  • 111
1 vote
0 answers
63 views

Problem with getting RSS because of authentication

Im am trying to get the rss feed from a wordpress website that someone else has built. But I get stuck in authentication problems, and i am not able to find the right solution. When I put http://...
0 votes
2 answers
138 views

check the first login for specific roles

Based on this answer i created a small functionality for users that are logging in for the first 3 times to make some elements classes use css animation. What i am trying to do is to adjust this code ...

1
2 3 4 5 6