Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot set "supportRequestState" field from external config into OAuth2 provider #1344

Open
Fede72 opened this issue Sep 23, 2022 · 0 comments

Comments

@Fede72
Copy link

Fede72 commented Sep 23, 2022

Bug, feature or question?

I'm not sure if is it a bug or a missing feature, but at now you cannot override by config the "supportRequestState" parameter because is not catch in the configure() method

Version and provider

What version of Hybrid Auth does this relates to?
3.8.x

Is this an issue with a provider? If yes, which one?
Oauth2

Reproduction

How can we replicate this issue?
Instantiate the provider using a config like this:

'Google'=>[
'enabled'=>true,
'supportRequestState'=>false,
'callback'=>'callback url',
'keys'=>[
'key'=>'105379sfsdf82-j3h7db9jnhdqs9f7s9d8fds7t3lqu.apps.googleusercontent.com',
'secret'=>'jOsd0f8sd90f8sd09fJk']],

Solution

Into the class: "abstract class OAuth2 extends AbstractAdapter implements AdapterInterface"

add, into the configure(), method:

$this->supportRequestState = $this->config->get('supportRequestState');

In this way the value into the original class is correctly overrided by the config extarnal

@Fede72 Fede72 changed the title $this->supportRequestState = $this->config->get('supportRequestState'); cannot set "supportRequestState" field from external config into OAuth2 provider Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant