-
Notifications
You must be signed in to change notification settings - Fork 138
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
Error setting Laravel Session Storage #319
Comments
My workaround is to add them already in "sessionStorage" => new Auth0\Laravel\Store\LaravelSession(),
"transientStorage" => new Auth0\Laravel\Store\LaravelSession(), That bypasses the function calls mentioned above that cause the error. |
Hey @JanMisker, thanks for the heads up! This actually turned out to be a bug in the underlying Auth0-PHP SDK having to do with named arguments. I'm preparing a fix and will cut a new release that will resolve the issue in this package as well. I'll post an update here when it's ready. |
Hey, @JanMisker 👋 I've pushed 8.3.2 of the underlying Auth0-PHP SDK with a fix for this. This should be resolved after a |
I do still encounter an issue, when my custom UserRepository is called with laravel-auth0/src/Auth/Guard.php Line 231 in add088c
|
Hey @JanMisker, thanks for letting me know. Sorry for the trouble. I think I might see the issue. Let me investigate further and I'll get back to you |
|
@la-roberto that I also got indeed, but could workaround it by adjusting "cookiePath" => env("AUTH0_COOKIE_PATH", ""), So adding an empty string as fallback value. |
|
Thanks @la-roberto the additional details and confirmation help! This is due to some reworking of the upstream PHP SDK's configuration class and how it handles validations that came about when we applied some improvements for PHP 8+'s new named arguments feature. I've got a fix I'm working on and will release upstream as 8.3.3 later today, which will fix the issue in this package. I'll update here once it's released so you can do a Composer update. Sorry for the trouble, and I appreciate your patience and help in troubleshooting it! |
Hey @JanMisker and @la-roberto, 👋 it's me again! 😆 I've released 7.2.2 of laravel-auth0 and 8.3.4 of auth0-php which I believe should shore up those issues. Can you try running |
Hi @evansims , it works again, thanks. |
Oh btw that |
SDK Version
Other (specify in 'additional context')
PHP Version
PHP 8.1
Composer Version
2.x
What happened?
Using 7.2.1 and out-of-the-box config, I get an error "Undefined array key 0".
This happens because in this line
laravel-auth0/src/Auth0.php
Line 86 in 09b32ad
the
sessionStorage:
changes the arguments passed to not be a integer-based array but an associative array. I didn't dig deep, but removing thesessionStorage:
andtransientStorage:
a few lines lower fixes the issue.Maybe in certain php versions/settings this was actually allowed, but not on my vanilla 8.1.11 on macOS.
How can we reproduce this issue?
Don't set a sessionStorage or transientStorage in the config, do anything that triggers setting up the config.
Additional context
No response
The text was updated successfully, but these errors were encountered: