Closed ryntab closed 1 year ago
So I did some investigations and I have an Idea where the error might be coming from.
Inside of the class Generic.php
, we have this:
public static function get_slug() : string {
return 'generic-oauth2';
}
but in the class ProviderRegistry.php
, it's
$registered_providers = apply_filters(
'graphql_login_registered_provider_configs',
[
'facebook' => Facebook::class,
---> 'generic' => Generic::class, <---
'github' => GitHub::class,
'google' => Google::class,
'instagram' => Instagram::class,
'linkedin' => LinkedIn::class,
'password' => Password::class,
'siteToken' => SiteToken::class,
]
);
This is a first check. I suppose the slug
should be the same for the overall to work.
I just proceed to the changes on my installation and it worked till the end.
I have confirmed the issue and am hoping to get a fix out shortly. @stephane-segning great catch, I need to straighten out the use of slugs/keys/types in a few places.
Ps: @ryntab this issue qualifies for my WPGraphQL Spring Cleaning campaign, where I'm donating dev hours to WPGraphQL projects for every issue/PR opened between now and April 31st. If you're interested, let me know via the link where you want the time donated to.
Description
Hello! I am trying to set up Discord Oauth2 with the generic Oauth2 provider. However I get the error message
"debugMessage": "Provider generic-oauth2 is not enabled."
I can see in my database that the
isEnabled
property is correct for the provider, and based on what i'm seeing in theProviderRegistry.php
file I would be receiving another message if there was error in the config.Steps to reproduce
Run a generic Oauth2 login mutation
Additional context
No response
Plugin Version
0.0.7
WordPress Version
Version 6.2
WPGraphQL Version
1.14.0
Additional enviornmental details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for WPGraphQL and Headless Login for WPGraphQL