I still think it might be more maintainable to handle this on the WordPress end by adding user metadata fields to indicate whether or not a user should be allowed to login to Discourse.
If you want to do this through a Discourse plugin, you can find the available SSO params near the top of this file: https://github.com/discourse/discourse/blob/master/lib/single_sign_on.rb. If you need an approved parameter, you could add it through a plugin.
You’d need to find a way to reopen the match_email_or_create_user method. That method returns a User object, so you could try redefining the method in a module, and call super within the redefined method to get the User. You could then check for the value of the approved parameter or the value of the add_groups parameter, and approve users if they meet your requirements.