- Issue created by @nachosalvador
- Merge request !17Issue 3421077 by nachosalvador: Allow return NULL in getRedirectUri(). β (Closed) created by nachosalvador
- last update
10 months ago 12 pass - Status changed to Needs review
10 months ago 9:35am 13 February 2024 - Status changed to Closed: works as designed
10 months ago 12:20pm 13 February 2024 - πΊπΈUnited States fathershawn New York
Thank you for you suggestion, especially with code! I'm not going to make this change for a couple of reasons.
This change introduces a union type, reducing the type safety of the method for all implementations. Further, it changes an interface to do this which really should only be done at a major version change as it changes the API of the module. If I had it to do again, I'd also remove the null union type from `Oauth2ClientPluginInterface::getScopes` but that too is for the next a major version change if there ever needs to be one.
In the module code, the only place we call `Oauth2ClientPluginInterface::getRedirectUri()` is in `Oauth2ClientPluginBase::getProvider`. It is an intentional choice to put the assembly of the provider in the implementation space of the plugin. This is why this method returns the most general AbstractProvider as its return type.
If you are building your client off our our base, you can override this method, and not include `redirectUri` as one of the options.