You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a Symfony 6.3 project using HWIOAuthBundle 2.0.0, and I'm looking for guidance on making resource owner configurations dynamic and updatable at runtime.
I want to allow specific users ("Admin" users) to set the client_id and client_secret for built-in resource owners (e.g., GitHub, BitBucket, GitLab, LinkedIn). The client_id and client_secret pairs are stored in a database and will be updated infrequently, making them suitable for heavy caching.
At the moment I'm toying with a Compiler Pass that updates the definition for each resource owners, as necessary. This feels a bit over-engineered, and I don't know how to tell the service container to recompile the service when the values have been updated?
What's the best or simplest way to achieve this? Is this even a supported use case, or will I have to find a way around it for the time being?
Thanks for your help, and thanks for publishing this bundle 馃檹 !
The text was updated successfully, but these errors were encountered:
Have you found anything about this? I would like to set the configuration in the database as well. I've got a use case where I have one codebase with different domains that need different configs.
Have you found anything about this? I would like to set the configuration in the database as well. I've got a use case where I have one codebase with different domains that need different configs.
Yes, I found a way, it's not super elegant but it works:
I added an injection pass in the Kernel to pass the keys dynamically:
Hi 馃憢
I'm working on a Symfony
6.3
project using HWIOAuthBundle2.0.0
, and I'm looking for guidance on making resource owner configurations dynamic and updatable at runtime.I want to allow specific users ("Admin" users) to set the
client_id
andclient_secret
for built-in resource owners (e.g., GitHub, BitBucket, GitLab, LinkedIn). Theclient_id
andclient_secret
pairs are stored in a database and will be updated infrequently, making them suitable for heavy caching.At the moment I'm toying with a Compiler Pass that updates the definition for each resource owners, as necessary. This feels a bit over-engineered, and I don't know how to tell the service container to recompile the service when the values have been updated?
What's the best or simplest way to achieve this? Is this even a supported use case, or will I have to find a way around it for the time being?
Thanks for your help, and thanks for publishing this bundle 馃檹 !
The text was updated successfully, but these errors were encountered: