All Questions
Tagged with authentication nonce
14 questions
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 ...
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 ...
0
votes
1
answer
684
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 ...
2
votes
1
answer
246
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
710
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(),
'...
2
votes
1
answer
3k
views
Can't GET draft posts via REST API from headless frontend
I have a headless install of Wordpress on v5.4.0. The frontend can't GET any post that is in draft status, though when accessing the API url directly the data is returned without an issue. I'm ...
1
vote
1
answer
2k
views
Rest API: wp_verify_nonce() fails despite receiving correct nonce value
I am generating a nonce to be used with client side fetch requests to the rest api:
function prepAllAdminScripts() {
wp_register_script(
'reactAdminArea'
, PLUGIN_FOLDER_URL . 'shared/...
6
votes
0
answers
1k
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 ...
4
votes
1
answer
2k
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
1
answer
544
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):
...
1
vote
2
answers
4k
views
WP REST API - Nonce passes wp_verify_nonce even after logout
I'm creating a single page app with WP REST API and AngularJS. After solving a problem with nonces on this question, now i'm facing something else.
To test the chance of adding fields and making them ...
4
votes
1
answer
11k
views
WP REST API: check if user is logged in
The idea is to show or hide some sections of the site in a theme that's fetching all data from the REST API, using AngularJS.
I thought this check would help me (nonce is passed as header, as ...
1
vote
2
answers
9k
views
wp-admin AJAX with Fetch API is done without user
TL;DR - Why is my user account not logged in during an AJAX request which is made inside wp-admin?
I have the following setup:
<?php
add_action('wp_ajax_foobar_action', 'foobar_action');
...
8
votes
1
answer
3k
views
Extend Wordpress (4.x) session and nonce
We've got a small web application that allows users to log in (via WordPress) and remain logged in for a max 15 min session for security purposes. Because most sessions will last longer, I have a ...