omniauth-proxy 0.1.0 → 0.2.1

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: 844924b13b161352ad3094228ef0f6e96c2588900311a903ca127dbc5f657538
4
- data.tar.gz: 15448692a7ac114f8ad748e59119e4716a84d114e3c8d5f335e658f64b6abeee
3
+ metadata.gz: a533b3d02145970eb0befa251c2720b18251aa40ed52f6b40182cd7b64430a15
4
+ data.tar.gz: 962cc9dc9f37d9ed5406448b8147f43e8821dafef7272390639fb2927c605eec
5
5
  SHA512:
6
- metadata.gz: d5352ccb33e928fa5ed809d3d76d8c22b6a9f78ea31e142d7318ce9e71e94292b7f9e3b3d28a8a25e9628020daa80721860a1e83ceb4044479134d686aedba2b
7
- data.tar.gz: e5de375875e4d1362df6dc8095df59c72828e133cecf8f37f8d769f774c0c39336ff8f35ad7f9dbb42e809c9ed3ef09a204591af64c69fc2d417a6703cabc69a
6
+ metadata.gz: 28a49cdad6c1e170eefdc5a012fe326e9944c04f43e470169b0f2b395a5176015d253104bca3bd1e794b7b0ab401bb6ad118b4e15875020f114fd5ae467878b1
7
+ data.tar.gz: 38936039a6eadec3489df6ccea5b148aeec443aa7acffd2f9891cc3839d6ca6c533c6744efdefc8465208cfb2f323d61daae8cd6fca77ab446b05c2e62f15b6e
@@ -1,7 +1,7 @@
1
1
  module OmniAuth
2
2
  module Strategies
3
3
  class Proxy
4
- PROXY_PATH = "https://oproxy.herokuapp.com/proxy"
4
+ PROXY_PATH = "https://oauth-proxy.fly.dev/proxy"
5
5
 
6
6
  def initialize(app, _options={})
7
7
  @app = app
@@ -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
@@ -1,3 +1,3 @@
1
1
  module OmniauthProxy
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -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.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuva
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-01 00:00:00.000000000 Z
11
+ date: 2024-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -90,7 +90,7 @@ homepage: https://oproxy.herokuapp.com
90
90
  licenses:
91
91
  - MIT
92
92
  metadata: {}
93
- post_install_message:
93
+ post_install_message:
94
94
  rdoc_options: []
95
95
  require_paths:
96
96
  - lib
@@ -105,8 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubygems_version: 3.1.2
109
- signing_key:
108
+ rubygems_version: 3.4.10
109
+ signing_key:
110
110
  specification_version: 4
111
111
  summary: Proxy OmniAuth request/callback cycles.
112
112
  test_files: []