Skip to content

Commit 5f9935c

Browse files
update
1 parent 2b66113 commit 5f9935c

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

config/settings.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
login:
2-
oauth2_enabled:
2+
oauth2_phone_enabled:
33
default: false
44
client: true
55
oauth2_client_id: ""
@@ -45,6 +45,9 @@ login:
4545
oauth2_button_title:
4646
default: "with OAuth2"
4747
client: true
48+
oauth2_phone_button_title:
49+
default: "with OAuth2 Phone"
50+
client: true
4851
oauth2_allow_association_change:
4952
default: false
5053
oauth2_disable_csrf:

plugin.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# frozen_string_literal: true
22

3-
# name: discourse-oauth2-basic
3+
# name: discourse-oauth2-phone-basic
44
# about: Generic OAuth2 Plugin
5-
# version: 0.3
5+
# version: 0.4
66
# authors: Robin Ward
77
# url: https://github.com/discourse/discourse-oauth2-basic
88
# transpile_js: true
99

10-
enabled_site_setting :oauth2_enabled
10+
enabled_site_setting :oauth2_phone_enabled
1111

1212
class ::OmniAuth::Strategies::Oauth2Basic < ::OmniAuth::Strategies::OAuth2
1313
option :name, "oauth2_basic_phone"
@@ -359,11 +359,11 @@ def after_authenticate(auth, existing_account: nil)
359359
end
360360

361361
def enabled?
362-
SiteSetting.oauth2_enabled
362+
SiteSetting.oauth2_phone_enabled
363363
end
364364
end
365365

366-
auth_provider title_setting: "oauth2_button_title", authenticator: OAuth2BasicAuthenticator.new
366+
auth_provider title_setting: "oauth2_phone_button_title", authenticator: OAuth2BasicAuthenticator.new
367367

368368
load File.expand_path(
369369
"../lib/validators/oauth2_basic/oauth2_fetch_user_details_validator.rb",

0 commit comments

Comments
 (0)