Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Warning: Undefined array key "REDIRECT_HTTP_AUTHORIZATION" #18

Open
ludovicsclain opened this issue Nov 18, 2023 · 2 comments
Open

Comments

@ludovicsclain
Copy link

Hey Josh 👋 
Hope you're doing well.
Just to let you know that with your latest version I get tons of warnings with the same comments:

PHP Warning:  Undefined array key "REDIRECT_HTTP_AUTHORIZATION" in ~/wp-content/plugins/wp-rest-api-auth0-main/src/wp-rest-api-auth0.php on line 43

Hope this helps you debug.
Take care!

@joshcanhelp
Copy link
Owner

@ludovicsclain - I made a change that should solve this. Can you replace your src/wp-rest-api-auth0.php file with this one?

https://github.com/joshcanhelp/wp-rest-api-auth0/blob/07071383120d5c1ee11580330ed7a071758453bc/src/wp-rest-api-auth0.php

Let me know if that works and I'll put out a proper release.

@ludovicsclain
Copy link
Author

Hey Josh 👋 
first of all I wish you all my best wishes for health and prosperity for this new year 2024 🎉 

I am taking advantage of the calm at the start of the year to return to conversations like this, and I have actually tested the new version of the code, and it is not conclusive.

Whereas with the penultimate version everything was going well (for example I could publish an article via API) but I had this error [04-Jan-2024 14:45:14 UTC] PHP Warning: Undefined array key "scope" in ~/wp-content/plugins/wp-rest-api-auth0-main/src/wp-rest-api-auth0.php on line 119, with the latest version I can no longer publish and I have this in my logs [04-Jan-2024 14:33:29 UTC] WP REST API Auth0: No access token found in the request with of course API response "You do not have authorization to publish… error 401".

Hope it helps!
Warm regards,
Ludovic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants