Any way to not require email verification with WP as the SSO Provider?

I have WordPress set up as my SSO provider and am requiring users to verify their email on the WP side before they can create an account. However, they’re nonetheless seeing the activation page after registering on WP and getting redirected to Discourse:

image

I see a lot in the main SSO post on here about needing to set require_activation = true for a custom implementation, but in the case of the discourse wp plugin SSO, is it not natively possible to bypass the requirement for users to confirm their email with discourse?

I feel like I’m probably missing something simple here, because it seems like this would be implemented into the core functionality.

Thanks,
Zach

1 Like

A lot of times, it is the case that emails used to create WordPress accounts are not meaningfully verified. Discourse depends a lot on the email address.

There used to be a disclaimer that before overriding the require_activation behavior one should ensure that they’re properly verifying the email one has used to sign up.

my most informed guess here would be that the option doesn’t exist as a checkbox is to prevent spam signups when WordPress is the SSO provider. However, a custom function can easily override this behavior.

add_filter( 'discourse_email_verification', 'wpdc_custom_disable_email_verification' );
function wpdc_custom_disable_email_verification() {
    return false;
}
4 Likes

Wow, thanks so much @itsbhanusharma! This is perfect.

Curious: did you find that hook just digging through the plugin source, or is there a documentation on available actions and filters somewhere? (I didn’t manage to find one, but maybe I missed something)

2 Likes

It has been mentioned multiple times across various topics here on meta. I personally use this for some clients so I had it in my notes as well :slight_smile:

2 Likes