- 🇺🇸United States grasmash
I don't understand how this can be achieved in 6.0. The goal is to dynamically assign scopes based on the user role. The ability to add default roles per consumer does not achieve assigning default roles per user -- users of different roles may use the same consumer.
- Status changed to Needs review
about 2 months ago 2:26pm 19 March 2025 - 🇧🇪Belgium dieterholvoet Brussels
However, we could add an event that developers can subscribe to (or a hook alter) to alter the scope negotiation behaviour on a custom module.
I opened a new MR that does this: it adds
hook_simple_oauth_scopes_alter()
, allowing to alter the requested scopes. - 🇧🇪Belgium dieterholvoet Brussels
dieterholvoet → changed the visibility of the branch 6.0.x to hidden.
- 🇧🇪Belgium dieterholvoet Brussels
dieterholvoet → changed the visibility of the branch 2857930-provide-default-scopes-6.x to hidden.
- 🇧🇪Belgium dieterholvoet Brussels
dieterholvoet → changed the visibility of the branch 2857930-2857930-provide-default-scopes-6.x to hidden.
- 🇧🇪Belgium dieterholvoet Brussels
The example in
simple_oauth.api.php
is what users would have to add to a custom module to achieve what this issue is about.