omniauth-proxy 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/strategies/proxy.rb +5 -1
- data/lib/omniauth_proxy.rb +10 -0
- data/lib/omniauth_proxy/version.rb +1 -1
- 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: 876be9f0d2d25255388af38bcb8ef41588d7f80e605a922f5bd8575551d180e6
|
4
|
+
data.tar.gz: a096571253f330479b4f6bbb5b6b51372c841b39fa379494d18c124a88c43e19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dcd71aca54c79d3950add1b85351a65af7b5097755615c92f942bc37bf237d6244c5c44ac59aad948f802542e117e7881bbe8f1e5dc01c50b744bede6bf9aac
|
7
|
+
data.tar.gz: 4f0b21dc4e65504a4a89ba68e50a9185fa56f567d3696d94ebb0a78dc95031e423ae82a0f236df865ca32c625ab1619a3a9c618a1f8563176b7d4e070e481c40
|
@@ -13,7 +13,7 @@ module OmniAuth
|
|
13
13
|
if ENV["OMNIAUTH_PROXY_ENABLED"].present? && status == 302
|
14
14
|
location = headers["Location"]
|
15
15
|
|
16
|
-
if is_google?(location) || is_github?(location)
|
16
|
+
if is_google?(location) || is_github?(location) || is_auth0?(location)
|
17
17
|
headers["Location"] = proxy_uri(location)
|
18
18
|
end
|
19
19
|
end
|
@@ -29,6 +29,10 @@ module OmniAuth
|
|
29
29
|
location.match?("https://github.com/login/oauth/authorize")
|
30
30
|
end
|
31
31
|
|
32
|
+
def is_auth0?(location)
|
33
|
+
location.match?("auth0.com/authorize")
|
34
|
+
end
|
35
|
+
|
32
36
|
def proxy_uri(location)
|
33
37
|
encoded_uri = Base64.urlsafe_encode64(location)
|
34
38
|
PROXY_PATH + "?uri=" + encoded_uri
|
data/lib/omniauth_proxy.rb
CHANGED
@@ -11,6 +11,16 @@ if ENV["OMNIAUTH_PROXY_ENABLED"].present?
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
if defined?(OmniAuth::Strategies::Auth0)
|
16
|
+
p "Patching Auth0 OmniAuth Strategy"
|
17
|
+
|
18
|
+
class OmniAuth::Strategies::Auth0
|
19
|
+
def callback_url
|
20
|
+
request.params['redirect_uri'] || super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
14
24
|
end
|
15
25
|
|
16
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|