-
Notifications
You must be signed in to change notification settings - Fork 32
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
[6.x] Document Credential Storages and Refactored Auth User Store to support different guards #122
[6.x] Document Credential Storages and Refactored Auth User Store to support different guards #122
Conversation
…t different guards
Apply fixes from StyleCI
This looks good to me. In this case it was - user belongs to organisation, so we want the organisations xero credentials. I don't believe this is a case we're current covering right? |
Yeah, thinking this through at the moment, users would not be able to provide a dynamic model selection. I was thinking as a potential solution, users could provide a callback on the Xero::useModelStore(Team::class, fn($builder) => $builder->where('id', Auth::user()->currentTeamId)); If you're happy with this pr, let's get it merged in, and I'll create a new task for this. 👍 |
Apply fixes from StyleCI
I've moved all code changes from this PR into #121 to make the AuthenicatedStore changes. |
Do you have any thoughts on this @hailwood? |
Hey @hailwood, Have you had any thoughts on this PR and the comment above? |
I've made some changes to Auth User store, do take into account that users may be authenticated by a different guard.
I've also wrote some docs for the new Credential Storages:
You can see a demo here:
https://jamesfreeman.github.io/laravel-xero-oauth2/credential-storage.html