omniauth-mastodon-st 0.9.4 → 0.9.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a97314eced3043669b1a622a4c0d39189a6589ce21b03a6d4ec45610f179da0
4
- data.tar.gz: ceff032df8012c07179867896c4d7e702386c73a8f4b338329b2c73a97797061
3
+ metadata.gz: 0de0f37a299f481b698cd55c6541c7691f74fa3cdab727941996a294467812b0
4
+ data.tar.gz: 36b836b8054052e008299b0b48fd6ac359e3c2c3036b641318813a5c6a2237ec
5
5
  SHA512:
6
- metadata.gz: 8287fc2ed544912cc532f24c11f6cc7ca9b1a662bd66a4d1726e39f0ca9c5671e5a878f14b9a82163fae492d92f4116a806d37bd6213f5fbdd2dd0a625df479a
7
- data.tar.gz: 0cf75326068a7528b2cce1c6bb577f564293628422df486d228566daf8601010a5baf53e7312a66441fe6c958045443a5370e0bf538a09263e84b3920fd06be8
6
+ metadata.gz: 87686b666bf99ac9382f887ba610c9f8c220f99774c06a33e784f95e3e2e47bf73fbeb1877b15cd50353ff6144ac5846604dd3f54f4027c9495b22b659924f14
7
+ data.tar.gz: 92f4ab09366df0586e4a54897fad4b896a9cf6b1fa7d5ba2bd44dd5dd0f1c99c1ccd9cfc89447c0776e44287804bb3d9ad4d471608db880d7ca887924d9368d9
@@ -12,7 +12,7 @@ module OmniAuth
12
12
  end
13
13
 
14
14
  def patch
15
- 4
15
+ 15
16
16
  end
17
17
 
18
18
  def pre
@@ -35,7 +35,8 @@ module OmniAuth
35
35
  # Before we can redirect the user to authorize access, we must know where the user is from
36
36
  # If the identifier param is not already present, a form will be shown for entering it
37
37
  def request_phase
38
- identifier ? start_oauth : get_identifier
38
+ # identifier ? start_oauth : get_identifier
39
+ start_oauth
39
40
  end
40
41
 
41
42
  def callback_phase
@@ -59,24 +60,24 @@ module OmniAuth
59
60
 
60
61
  private
61
62
 
62
- def get_identifier
63
- I18n.with_locale(locale) do
64
- form = OmniAuth::Form.new(title: translate('.omniauth.mastodon.title'))
65
- form.text_field translate('.omniauth.mastodon.text'), 'identifier'
66
- form.button translate('.omniauth.mastodon.button')
67
- form.to_response
68
- end
69
- end
70
-
71
- def translate(t)
72
- I18n.exists?(t) ? I18n.t(t) : I18n.t(t, locale: :en)
73
- end
74
-
75
- def locale
76
- loc = request.params['locale'] || session[:omniauth_login_locale] || I18n.default_locale
77
- loc = :en unless I18n.locale_available?(loc)
78
- loc
79
- end
63
+ # def get_identifier
64
+ # I18n.with_locale(locale) do
65
+ # form = OmniAuth::Form.new(title: translate('.omniauth.mastodon.title'))
66
+ # form.text_field translate('.omniauth.mastodon.text'), 'identifier'
67
+ # form.button translate('.omniauth.mastodon.button')
68
+ # form.to_response
69
+ # end
70
+ # end
71
+
72
+ # def translate(t)
73
+ # I18n.exists?(t) ? I18n.t(t) : I18n.t(t, locale: :en)
74
+ # end
75
+
76
+ # def locale
77
+ # loc = request.params['locale'] || session[:omniauth_login_locale] || I18n.default_locale
78
+ # loc = :en unless I18n.locale_available?(loc)
79
+ # loc
80
+ # end
80
81
 
81
82
  def start_oauth
82
83
  set_options_from_identifier
@@ -92,13 +93,14 @@ module OmniAuth
92
93
  end
93
94
 
94
95
  def set_options_from_identifier
95
- username, domain = identifier.split('@')
96
- client_id, client_secret = options.credentials.call(domain, callback_url)
97
-
98
- options.identifier = identifier
99
- options.client_options[:site] = "https://#{domain}"
100
- options.client_id = client_id
101
- options.client_secret = client_secret
96
+ # username, domain = identifier.split('@')
97
+ domain = options[:domain]
98
+ # client_id, client_secret = options.credentials.call(domain, callback_url)
99
+ # options.identifier = identifier
100
+ # options.client_options[:site] = "http://#{domain}"
101
+ options.client_options[:site] = domain
102
+ # options.client_id = client_id
103
+ # options.client_secret = client_secret
102
104
  end
103
105
  end
104
106
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-mastodon-st
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Rochko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth