DutchCodingCompany / filament-socialite

Add OAuth login through Laravel Socialite to Filament.
MIT License
153 stars 38 forks source link

Use set scopes instead of scopes when redirecting to provider #33

Closed jamesalvarez closed 1 year ago

jamesalvarez commented 1 year ago

Sometimes SocialiteProviders come with an default annoying default scope - I think it would be better to use setScopes rather than scopes, as the latter merges with these default scopes, rather than allowing the user to be explicit and set them.

In my case I was using the Orcid SocialiteProvider which included a member only API scope, where I wanted to use just the public API.

I have submitted a PR for the above provider too, but feel setting scopes in the services.php file explicitly, as this plugin does, must be a better pattern.

dododedodonl commented 1 year ago

Tank you for your PR. As this would be a breaking change, I am not able to merge this at this moment. I will keep this in mind for a next version.

The easiest solution for you at this moment would be to extend the SocialiteLoginController and override the redirectToProvider.