Questions tagged [authentication]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 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(); ...
user avatar
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
26 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: "...
user avatar
  • 101
0 votes
0 answers
26 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 ...
user avatar
1 vote
0 answers
83 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 ...
user avatar
  • 11
0 votes
0 answers
22 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 ...
user avatar
  • 157
0 votes
1 answer
20 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 ...
user avatar
  • 1,251
0 votes
0 answers
62 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: { ...
user avatar
0 votes
0 answers
32 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 ...
user avatar
0 votes
0 answers
15 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 ...
user avatar
  • 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. ...
user avatar
1 vote
1 answer
37 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 ...
user avatar
  • 115
0 votes
1 answer
69 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 ...
user avatar
-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 ...
user avatar
0 votes
0 answers
35 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/...
user avatar
0 votes
1 answer
54 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 ...
user avatar
0 votes
0 answers
28 views

Need to use Wordpress page as authentication for different service

I am first timer with Wordpress and I would really need help or advice. I have an mobile app service on VPS and client suggested that it would be nice to have singular login info to the App and his ...
user avatar
0 votes
1 answer
26 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 ...
user avatar
  • 101
0 votes
1 answer
1k 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 ...
user avatar
  • 105
0 votes
0 answers
21 views

Automate Wordpress Login

I am doing JamStack style hosting where a Wordpress site is hosted at: https://admin.example.com and is protected by basic auth. What I want to be able to do is automate the admin login so, for ...
user avatar
1 vote
1 answer
133 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 ...
user avatar
  • 111
0 votes
0 answers
94 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 ...
user avatar
0 votes
0 answers
16 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 ...
user avatar
0 votes
1 answer
145 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 ...
user avatar
0 votes
0 answers
31 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 ...
user avatar
0 votes
1 answer
31 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 ...
user avatar
1 vote
0 answers
334 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 ...
user avatar
  • 111
0 votes
0 answers
55 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 ...
user avatar
0 votes
0 answers
78 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 ...
user avatar
  • 3
0 votes
1 answer
33 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 ...
user avatar
  • 3
0 votes
0 answers
78 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 ...
user avatar
  • 1
0 votes
0 answers
32 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 ...
user avatar
  • 1
1 vote
0 answers
22 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 ...
user avatar
  • 11
0 votes
1 answer
274 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
52 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?
user avatar
  • 99
1 vote
1 answer
123 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. ...
user avatar
1 vote
1 answer
63 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(), '...
user avatar
0 votes
1 answer
301 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 ...
user avatar
  • 105
1 vote
1 answer
44 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 ...
user avatar
  • 11
0 votes
0 answers
63 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 ...
user avatar
  • 1
0 votes
0 answers
73 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 ...
user avatar
  • 111
1 vote
0 answers
47 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://...
user avatar
0 votes
2 answers
115 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 ...
user avatar
0 votes
1 answer
78 views

What am is missing? (API CORS)

I created a plug-in that retrieves data from an api(at least tries to!). This is the code of the function. function call_back(){ $apiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; $response = ...
user avatar
1 vote
0 answers
72 views

Authentication with the Rest API when using an External Application

Good day! I'm new to rest api. My task: to make authorization and management of user meta-information on WordPress. More specifically: I write games in html5 (in fact, this is a Java script), and I ...
user avatar
  • 11
1 vote
0 answers
181 views

How to force JWT auth for default GET endpoints of Wordpress rest api?

The default GET endpoints (for e.g. http://scintec.net/wp-json/wp/v2/posts/) of the Wordpress Rest api are public and can be accessed by anyone. I am currently interacting with a Wordpress Rest api ...
user avatar
0 votes
0 answers
215 views

How to authenticate using JWT by ajax?

As WordPress REST API Doc said, the authentication by for REST API can be done by JWT (https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/) The recommended plugin in the ...
user avatar
  • 321
0 votes
0 answers
204 views

Social login authentication via wordpress rest api

I am building a Vue app powered by Wordpress Rest API. After stumbling upon many options for authentication, I chose JWT authentication. However, i still haven't been able to find the solution for ...
user avatar
0 votes
2 answers
410 views

Authenticate current user to REST API

I have a Plugin similiar to woocommerce which is providing me an REST API Endpoint for getting some user specific data. When I try to access the API via Postman, i get an 401 - Not Authorized Error. ...
user avatar
0 votes
1 answer
62 views

Can I "protect" a page with a form asking for an email address?

I am developing a viewing room for an art gallery. Viewing rooms are pages with content that can only be seen by visitors if they provide their email address to add them to a newsletter. Something ...
user avatar
  • 1,617

1
2 3 4 5 6