File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,25 @@ class ::OmniAuth::Strategies::Oauth2Basic < ::OmniAuth::Strategies::OAuth2
3232 result
3333 end
3434 end
35+ # customization
36+ def authorize_params
37+ super . tap do |params |
38+ params [ :appid ] = options . client_id
39+ params [ :scope ] = 'snsapi_login'
40+ params . delete ( 'client_id' )
41+
42+ end
43+ end
44+ def token_params
45+ super . tap do |params |
46+ params [ :appid ] = options . client_id
47+ params [ :secret ] = options . client_secret
48+ params [ :parse ] = :json
49+ params . delete ( 'client_id' )
50+ params . delete ( 'client_secret' )
51+ end
52+ end
53+
3554
3655 def callback_url
3756 Discourse . base_url_no_prefix + script_name + callback_path
@@ -258,6 +277,8 @@ def fetch_user_details(token, id)
258277 end
259278
260279 def primary_email_verified? ( auth )
280+ log ( "primary_email_verified: \n \n creds: #{ auth [ 'info' ] [ 'email_verified' ] } " )
281+
261282 return true if SiteSetting . oauth2_email_verified
262283 verified = auth [ "info" ] [ "email_verified" ]
263284 verified = true if verified == "true"
You can’t perform that action at this time.
0 commit comments