DEV: Deprecate OAuth2Authenticator and OAuth2UserInfo (#15427)
These have been superseded by ManagedAuthenticator and UserAssociatedAccount. For more information, see https://meta.discourse.org/t/106695
This commit is contained in:
@@ -8,6 +8,7 @@ class Auth::OAuth2Authenticator < Auth::Authenticator
|
||||
|
||||
# only option at the moment is :trusted
|
||||
def initialize(name, opts = {})
|
||||
Discourse.deprecate("OAuth2Authenticator is deprecated. Use `ManagedAuthenticator` and `UserAssociatedAccount` instead. For more information, see https://meta.discourse.org/t/106695", drop_from: '2.9.0', output_in_test: true)
|
||||
@name = name
|
||||
@opts = opts
|
||||
end
|
||||
|
||||
+1
-1
@@ -876,7 +876,7 @@ module Discourse
|
||||
digest = Digest::MD5.hexdigest(warning)
|
||||
redis_key = "deprecate-notice-#{digest}"
|
||||
|
||||
if !Discourse.redis.without_namespace.get(redis_key)
|
||||
if Rails.logger && !Discourse.redis.without_namespace.get(redis_key)
|
||||
Rails.logger.warn(warning)
|
||||
begin
|
||||
Discourse.redis.without_namespace.setex(redis_key, 3600, "x")
|
||||
|
||||
Reference in New Issue
Block a user