auth0 / laravel-auth0

Laravel SDK for Auth0 Authentication and Management APIs.
MIT License
246 stars 135 forks source link

feat: add Laravel Queues support #455

Open ngreb opened 6 months ago

ngreb commented 6 months ago

Checklist

Description

Laravel Version 10

SDK Version 7.12.0

PHP Version PHP 8.2

I'm using auth0 management API in a project. Everything works fine if the API is called synchronously. But when it is used through laravel queue (jobs), then some time after the worker starts, it begins to constantly return a 401 error “Expired token received for JSON Web Token validation”. All settings in the auth0 config have default values.

evansims commented 5 months ago

Hey @ngreb 👋 Thanks for reporting this! You bring up a great point: this library was not built with or ever tested with Queues in mind, so I'm not surprised that we might be hitting some challenges there.

We'll look into adding support as soon as we can, but in the meantime, if anyone wants to investigate the issue and provide a pull request adding support (and, critically, unit tests!) around this, it would be most welcome