Open jonerickson opened 1 year ago
I would recommend to publish the PassportServiceProvider instead.
Do you mean just extending src/Laravel/PassportServiceProvider.php? In this case I would have to make sure and keep the boot method up-to-date with each update of your package. Seems like more work and more failure points to me.
Currently PassportServiceProvider overwrites the scopes Passport recognizes with only the OIDC scopes provided in the config file:
Passport\Passport::tokensCan(config('openid.passport.tokens_can'));
This PR takes into account scopes that may have already been defined to be used by Passport and merges them with the OIDC scopes. It uses the Collection helper merge where the OIDC scopes will take precedence in the case of duplicates.
If no scopes were previously defined, no behavior changes.