Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
This PR includes changes to the UserProvider API to ease host applications in implementing their own User model types. The new default user model provided by the library only includes the normalized user data returned with the authenticated session or provided access token. The StateInstance now keeps track of associated tokens, scopes and expiration states.
To implement your own UserProvider:
config/auth.php
file. Within the Auth0 provider, assign a customrepository
value pointing to your user provider class. For example:Illuminate\Contracts\Auth\Authenticatable
to be compatible with Laravel's Guard API, and this library. It must also implement eitherAuth0\Laravel\Contract\Model\Stateful\User
orAuth0\Laravel\Contract\Model\Stateless\User
depending on your application use case. For example:Note: As state request data has been moved out of the returned user model, you should now query the StateInstance from within your application for this data. For example: