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 +4 -4
- data/lib/omniauth/mastodon/version.rb +1 -1
- data/lib/omniauth/strategies/mastodon.rb +28 -26
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de0f37a299f481b698cd55c6541c7691f74fa3cdab727941996a294467812b0
|
4
|
+
data.tar.gz: 36b836b8054052e008299b0b48fd6ac359e3c2c3036b641318813a5c6a2237ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87686b666bf99ac9382f887ba610c9f8c220f99774c06a33e784f95e3e2e47bf73fbeb1877b15cd50353ff6144ac5846604dd3f54f4027c9495b22b659924f14
|
7
|
+
data.tar.gz: 92f4ab09366df0586e4a54897fad4b896a9cf6b1fa7d5ba2bd44dd5dd0f1c99c1ccd9cfc89447c0776e44287804bb3d9ad4d471608db880d7ca887924d9368d9
|
@@ -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
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
end
|
70
|
-
|
71
|
-
def translate(t)
|
72
|
-
|
73
|
-
end
|
74
|
-
|
75
|
-
def locale
|
76
|
-
|
77
|
-
|
78
|
-
|
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
|
-
|
97
|
-
|
98
|
-
options.identifier = identifier
|
99
|
-
options.client_options[:site] = "
|
100
|
-
options.
|
101
|
-
options.
|
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
|
+
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-
|
11
|
+
date: 2021-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|