Laravel Auth0 override Userprovider / issue with cached user

Hello!
I have followed the user guide here laravel-auth0/docs/Users.md at main · auth0/laravel-auth0 · GitHub and have been able to successfully implement a custom UserRepository.

This way, whenever I do auth()->user() I return all data that is stored in my local DB, rather than just what’s returned by the auth0 session.

However, when trying to update my local data, I noticed an issue with persistence. After some investigating, I discovered that is caused by the inner authProvider
Auth0\Laravel\UserProviderAbstract;

The method retrieveByCredentials caches the user for 5 seconds here

$this->withoutRecording(static fn (): bool => Cache::put('auth0_sdk_credential_lookup_' . $hash, $lastResponse, 5));

What happens is that my data is not timely reflected when I do something like:
auth()->user()->update(['my_local_db_column' => 'foo'])

I had to create a new provider and boot it in place of the default one, and now things work as expected.

I wonder if there’s another way, considering the provider coming with the package is “final” and therefore not intended to be overridden.

Thanks!