HWIOAuthBundle
HWIOAuthBundle copied to clipboard
Documentation error on state option
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Support question? | no |
Version | 2.2 |
Actual Behavior
The documentation indicates we can configure keys-values array in the state
option of resource owners but the configuration allows scalars only resulting the following error:
Invalid type for path "hwi_oauth.resource_owners.google.options.state". Expected "scalar", but got "array".
Expected Behavior
I'm not sure if the expected behavior is being able to configure the state option as array or if the documentation is wrong.
But as the State object seems to accept both string and array parameters, I guess array should be possible.
Steps to Reproduce
Use the following configuration:
hwi_oauth:
firewall_names: [main]
resource_owners:
google:
type: google
client_id: '%env(APP_GOOGLE_ID)%'
client_secret: '%env(APP_GOOGLE_SECRET)%'
scope: "email profile"
options:
state:
foo: "bar"
Possible Solutions
Either update the documentation to match the code or allowing array in configuration.