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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 844924b13b161352ad3094228ef0f6e96c2588900311a903ca127dbc5f657538
4
- data.tar.gz: 15448692a7ac114f8ad748e59119e4716a84d114e3c8d5f335e658f64b6abeee
3
+ metadata.gz: 876be9f0d2d25255388af38bcb8ef41588d7f80e605a922f5bd8575551d180e6
4
+ data.tar.gz: a096571253f330479b4f6bbb5b6b51372c841b39fa379494d18c124a88c43e19
5
5
  SHA512:
6
- metadata.gz: d5352ccb33e928fa5ed809d3d76d8c22b6a9f78ea31e142d7318ce9e71e94292b7f9e3b3d28a8a25e9628020daa80721860a1e83ceb4044479134d686aedba2b
7
- data.tar.gz: e5de375875e4d1362df6dc8095df59c72828e133cecf8f37f8d769f774c0c39336ff8f35ad7f9dbb42e809c9ed3ef09a204591af64c69fc2d417a6703cabc69a
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
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module OmniauthProxy
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
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.1.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-03-01 00:00:00.000000000 Z
11
+ date: 2020-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth