mirror of
https://github.com/discourse/discourse.git
synced 2026-08-13 06:25:11 -05:00
DEV: Explicitly define primary_email_verified? method for managed authenticators (#19127)
We're going to change the default return value of the `primary_email_verified?` method of `Auth::ManagedAuthenticator` to false, so we need to explicitly define the method on authenticators to return true where it makes sense to do so. Internal topic: t/82084.
This commit is contained in:
@@ -23,4 +23,10 @@ class Auth::TwitterAuthenticator < Auth::ManagedAuthenticator
|
||||
strategy.options[:consumer_secret] = SiteSetting.twitter_consumer_secret
|
||||
}
|
||||
end
|
||||
|
||||
# twitter doesn't return unverfied email addresses in the API
|
||||
# https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials
|
||||
def primary_email_verified?(auth_token)
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user