V5 - Login failing (with no errors) but only for some accounts.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- php
- Domain
- authentication
Research direction
Start at src/Actions/Authentication.php#L533 and compare the cookies and redirect behavior for affected and working accounts. Reproduce on the Pantheon staging site, then compare with the local DDEV environment and Auth0 monitoring logs. Done means the affected accounts complete login and WordPress recognizes them as logged in without errors.
Written by the indexing model from the issue text.
Description
Checklist
- I have looked into the Readme and the documentation, and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
I have a Pantheon multi-dev staging site with Auth0 V5 (https://github.com/auth0/wordpress), installed via composer.
I have applied the Pantheon cookie name fix outlined here:
https://github.com/auth0/wordpress/issues/892
The setup process has been fairly smooth, but for a small number of accounts the login process completes successfully but WordPress acts like they are not logged in.
The login process does work for a large number of the users, so it doesn't appear to be an installation/configuration issue. It is working, just not for everyone.
I've added die() throughout to see what code is being hit on Pantheon, and the redirect that happens is here:
https://github.com/auth0/wordpress/blob/5.x/src/Actions/Authentication.php#L533
The cookies that are created for the problem account:
For comparison, the cookies that are created for a working account:
Reproduction
Most common, working behaviour:
- Click login button on WP site
- Taken to custom Auth0 domain
- Redirected back to WP site. I am logged in.
This is working as expected.
Problem behaviour (which just so happens to be my client/admin users, so it's a big issue):
- Click login button on WP site
- Taken to custom Auth0 domain
- Redirected back to WP site. Cookies are created but I'm still in a logged out state.
I do not see any errors on screen or in the server error logs.
I see the successful login in the Auth0 → Monitoring → Logs.
Additional context
If I clone the pantheon database into my local DDEV environment I can login successfully, even with the account that causes issues on the Pantheon staging site.
wp-auth0 version
5.2.1
WordPress version
6.8.2
PHP version
8.3
- Dominant language
- PHP
- Stars
- 182
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/wordpress
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
-
Scope: Documentation
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·