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

Auth0-PHP@5.3.1 breaks Laravel-Auth0 #108

Closed
SamuelWillis opened this issue Nov 1, 2018 · 3 comments
Closed

Auth0-PHP@5.3.1 breaks Laravel-Auth0 #108

SamuelWillis opened this issue Nov 1, 2018 · 3 comments
Milestone

Comments

@SamuelWillis
Copy link

Installing this package installs auth0@5.3.1.

This is causing an exception to be thrown that stems from the LoginServiceProvider:

[2018-10-31 22:21:05] local.ERROR: Undefined index: environment {"exception":"[object] (ErrorException(code: 0): Undefined index: environment at /var/www/vendor/auth0/auth0-php/src/API/Helpers/InformationHeaders.php:128)"} []
[2018-10-31 22:21:05] local.ERROR: Undefined index: environment {"exception":"[object] (ErrorException(code: 0): Undefined index: environment at /var/www/vendor/auth0/auth0-php/src/API/Helpers/InformationHeaders.php:128)"} []

In InformationHeaders.php line 128:

  Undefined index: environment

I've traced it down to the InformationHeaders::Extend function that looks to fill the headers in with the old headers environment field.

It gets the old headers from the auth0 ApiClient getInfoHeadersData.
This change to ApiClient no longer sets an environment field, however.

One suggestion would be to change the composer.json to:

   "require": {
        "auth0/auth0-php": "=>5.1 <5.3.1",
},

I can also raise this issue on the auth0-php package as the update to the ApiClient has broken the InformationHeaders@Extend function (which is slated for depracation).

@SamuelWillis SamuelWillis changed the title Auth0-PHP@5.3.1 Breaks Laravel-auth0 Auth0-PHP@5.3.1 breaks Laravel-Auth0 Nov 1, 2018
@joshcanhelp
Copy link
Contributor

@SamuelWillis - Thank you for this report! I have an issue open in the PHP SDK and was confused why Extend was being called anywhere. Sounds like that issue is probably on Laravel as well.

Apologies for the trouble here. I'll release a fix for this today!

@SamuelWillis
Copy link
Author

@joshcanhelp Thank you so much! Let me know if you need anything more from me!

@joshcanhelp
Copy link
Contributor

joshcanhelp commented Nov 2, 2018

Fixed and released in PHP SDK 5.3.2. Apologies for the trouble here.

@joshcanhelp joshcanhelp added this to the 5.1.1 milestone Jun 27, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants