omniauth 2.0.4 → 2.1.2
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/.github/dependabot.yml +18 -0
- data/.github/workflows/jruby.yml +28 -0
- data/.github/workflows/main.yml +8 -36
- data/.github/workflows/truffle_ruby.yml +24 -0
- data/.gitignore +1 -0
- data/Gemfile +2 -8
- data/README.md +98 -50
- data/SECURITY.md +1 -0
- data/lib/omniauth/builder.rb +2 -3
- data/lib/omniauth/form.rb +2 -1
- data/lib/omniauth/strategies/developer.rb +1 -1
- data/lib/omniauth/strategy.rb +1 -0
- data/lib/omniauth/version.rb +1 -1
- data/lib/omniauth.rb +4 -0
- data/omniauth.gemspec +1 -1
- metadata +11 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0de71776aec3f0b016291d25d87fed25bbfa49f5fcd0abcf0f7463be97111e92
|
|
4
|
+
data.tar.gz: dd52494efab1533e54f3a85ceab332db16e02ff6d633a00c99f52d7f089303ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16de198d83402c9613961994c0fe1f1c9fc709de6a546168830248c237e2fe61f0847e129f94a4bf51570cbb8beffa4e20b6542e23a342a17aa41bd8c2738200
|
|
7
|
+
data.tar.gz: f703bef08321f981909d950dba902989b5efb5d4c820b9f6b03c5695bbe56620e2656bfd75d527101ed3d7cdc78dd4c886f2e4991f12c01ea170e1ad900b3245
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: bundler
|
|
9
|
+
directory: '/'
|
|
10
|
+
schedule:
|
|
11
|
+
interval: weekly
|
|
12
|
+
open-pull-requests-limit: 99
|
|
13
|
+
|
|
14
|
+
- package-ecosystem: github-actions
|
|
15
|
+
directory: '/'
|
|
16
|
+
schedule:
|
|
17
|
+
interval: daily
|
|
18
|
+
open-pull-requests-limit: 99
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: JRuby
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [ master ]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ master ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ${{ matrix.os }}-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu, macos]
|
|
15
|
+
jruby: [jruby, jruby-head]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v3
|
|
18
|
+
- name: Set up Ruby
|
|
19
|
+
uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: ${{ matrix.jruby }}
|
|
22
|
+
bundler-cache: true
|
|
23
|
+
env:
|
|
24
|
+
JRUBY_OPTS: --debug
|
|
25
|
+
- name: Run tests
|
|
26
|
+
env:
|
|
27
|
+
JRUBY_OPTS: --debug
|
|
28
|
+
run: bundle exec rake
|
data/.github/workflows/main.yml
CHANGED
|
@@ -15,75 +15,47 @@ on:
|
|
|
15
15
|
|
|
16
16
|
jobs:
|
|
17
17
|
test:
|
|
18
|
-
runs-on:
|
|
18
|
+
runs-on: ${{ matrix.os }}-latest
|
|
19
19
|
strategy:
|
|
20
20
|
fail-fast: false
|
|
21
21
|
matrix:
|
|
22
22
|
os: [ubuntu, macos]
|
|
23
|
-
ruby: [2.5, 2.6, 2.7,
|
|
23
|
+
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, head, debug]
|
|
24
24
|
steps:
|
|
25
|
-
- uses: actions/checkout@
|
|
25
|
+
- uses: actions/checkout@v3
|
|
26
26
|
- name: Set up Ruby
|
|
27
27
|
uses: ruby/setup-ruby@v1
|
|
28
28
|
with:
|
|
29
29
|
ruby-version: ${{ matrix.ruby }}
|
|
30
30
|
bundler-cache: true
|
|
31
|
-
- name: Install dependencies
|
|
32
|
-
run: bundle install
|
|
33
31
|
- name: Run tests
|
|
34
32
|
run: bundle exec rake
|
|
35
|
-
test-jruby:
|
|
36
|
-
runs-on: ubuntu-18.04
|
|
37
|
-
strategy:
|
|
38
|
-
fail-fast: false
|
|
39
|
-
matrix:
|
|
40
|
-
os: [ubuntu, macos]
|
|
41
|
-
jruby: [jruby] # TODO: Add back jruby-head once we figure out why there's a bundler mismatch
|
|
42
|
-
steps:
|
|
43
|
-
- uses: actions/checkout@v2
|
|
44
|
-
- name: Set up Ruby
|
|
45
|
-
uses: ruby/setup-ruby@v1
|
|
46
|
-
with:
|
|
47
|
-
ruby-version: ${{ matrix.jruby }}
|
|
48
|
-
bundler-cache: true
|
|
49
|
-
- name: Install dependencies
|
|
50
|
-
env:
|
|
51
|
-
JRUBY_OPTS: --debug
|
|
52
|
-
run: bundle install
|
|
53
|
-
- name: Run tests
|
|
54
|
-
env:
|
|
55
|
-
JRUBY_OPTS: --debug
|
|
56
|
-
run: bundle exec rake
|
|
57
33
|
frozen-string-compat:
|
|
58
|
-
runs-on: ubuntu-
|
|
34
|
+
runs-on: ubuntu-latest
|
|
59
35
|
steps:
|
|
60
|
-
- uses: actions/checkout@
|
|
36
|
+
- uses: actions/checkout@v3
|
|
61
37
|
- name: Set up Ruby
|
|
62
38
|
uses: ruby/setup-ruby@v1
|
|
63
39
|
with:
|
|
64
40
|
ruby-version: 2.6
|
|
65
41
|
bundler-cache: true
|
|
66
|
-
- name: Install dependencies
|
|
67
|
-
run: bundle install
|
|
68
42
|
- name: Run tests
|
|
69
43
|
env:
|
|
70
44
|
RUBYOPT: "--enable-frozen-string-literal"
|
|
71
45
|
run: bundle exec rake
|
|
72
46
|
coveralls:
|
|
73
|
-
runs-on: ubuntu-
|
|
47
|
+
runs-on: ubuntu-latest
|
|
74
48
|
steps:
|
|
75
|
-
- uses: actions/checkout@
|
|
49
|
+
- uses: actions/checkout@v3
|
|
76
50
|
- name: Set up Ruby
|
|
77
51
|
uses: ruby/setup-ruby@v1
|
|
78
52
|
with:
|
|
79
53
|
ruby-version: 2.6
|
|
80
54
|
bundler-cache: true
|
|
81
|
-
- name: Install dependencies
|
|
82
|
-
run: bundle install
|
|
83
55
|
- name: Run tests
|
|
84
56
|
run: bundle exec rake
|
|
85
57
|
- name: Coveralls GitHub Action
|
|
86
|
-
uses: coverallsapp/github-action@
|
|
58
|
+
uses: coverallsapp/github-action@v2
|
|
87
59
|
with:
|
|
88
60
|
github-token: ${{ secrets.github_token }}
|
|
89
61
|
path-to-lcov: './coverage/lcov/omniauth.lcov'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: TruffleRuby
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [ master ]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ master ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ${{ matrix.os }}-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu, macos]
|
|
15
|
+
ruby: [truffleruby, truffleruby-head]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v3
|
|
18
|
+
- name: Set up Ruby
|
|
19
|
+
uses: ruby/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
|
22
|
+
bundler-cache: true
|
|
23
|
+
- name: Run tests
|
|
24
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
gem 'jruby-openssl', '~> 0.10.5', :
|
|
3
|
+
gem 'jruby-openssl', '~> 0.10.5', platforms: :jruby
|
|
4
4
|
gem 'rake', '>= 12.0'
|
|
5
5
|
gem 'yard', '>= 0.9.11'
|
|
6
6
|
|
|
@@ -13,17 +13,11 @@ end
|
|
|
13
13
|
|
|
14
14
|
group :test do
|
|
15
15
|
gem 'coveralls_reborn', '~> 0.19.0', require: false
|
|
16
|
-
gem 'hashie', '>= 3.4.6', '~> 4.0.0', :platforms => [:jruby_18]
|
|
17
|
-
gem 'json', '~> 2.3.0', :platforms => %i[jruby_18 jruby_19 ruby_19]
|
|
18
|
-
gem 'mime-types', '~> 3.1', :platforms => [:jruby_18]
|
|
19
|
-
gem 'rack', '>= 2.0.6', :platforms => %i[jruby_18 jruby_19 ruby_19 ruby_20 ruby_21]
|
|
20
16
|
gem 'rack-test'
|
|
21
|
-
gem 'rest-client', '~> 2.0.0', :platforms => [:jruby_18]
|
|
22
17
|
gem 'rspec', '~> 3.5'
|
|
23
18
|
gem 'rack-freeze'
|
|
24
|
-
gem 'rubocop', '>= 0.58.2', '< 0.69.0', :
|
|
19
|
+
gem 'rubocop', '>= 0.58.2', '< 0.69.0', platforms: %i[ruby_22 ruby_23 ruby_24]
|
|
25
20
|
gem 'simplecov-lcov'
|
|
26
|
-
gem 'tins', '~> 1.13', :platforms => %i[jruby_18 jruby_19 ruby_19]
|
|
27
21
|
end
|
|
28
22
|
|
|
29
23
|
gemspec
|
data/README.md
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
# OmniAuth: Standardized Multi-Provider Authentication
|
|
2
2
|
|
|
3
3
|
[][gem]
|
|
4
|
-
[][githubactions]
|
|
5
|
+
[][githubactionstruffle]
|
|
6
|
+
[][githubactionsjruby]
|
|
5
7
|
[][codeclimate]
|
|
6
8
|
[][coveralls]
|
|
7
9
|
|
|
8
10
|
[gem]: https://rubygems.org/gems/omniauth
|
|
9
|
-
[
|
|
11
|
+
[githubactions]: https://github.com/omniauth/omniauth/actions/workflows/main.yml
|
|
12
|
+
[githubactionstruffle]: https://github.com/omniauth/omniauth/actions/workflows/truffle_ruby.yml
|
|
13
|
+
[githubactionsjruby]: https://github.com/omniauth/omniauth/actions/workflows/jruby.yml
|
|
10
14
|
[codeclimate]: https://codeclimate.com/github/omniauth/omniauth
|
|
11
15
|
[coveralls]: https://coveralls.io/r/omniauth/omniauth
|
|
12
16
|
|
|
13
|
-
This is the documentation for the
|
|
17
|
+
This is the documentation for the in-development branch of OmniAuth.
|
|
18
|
+
You can find the documentation for the latest stable release [here](https://github.com/omniauth/omniauth/tree/v2.1.2)
|
|
14
19
|
|
|
15
20
|
## An Introduction
|
|
16
21
|
OmniAuth is a library that standardizes multi-provider authentication for
|
|
@@ -83,34 +88,7 @@ environment of a request to `/auth/:provider/callback`. This hash
|
|
|
83
88
|
contains as much information about the user as OmniAuth was able to
|
|
84
89
|
glean from the utilized strategy. You should set up an endpoint in your
|
|
85
90
|
application that matches to the callback URL and then performs whatever
|
|
86
|
-
steps are necessary for your application.
|
|
87
|
-
you would add a line in your `routes.rb` file like this:
|
|
88
|
-
|
|
89
|
-
```ruby
|
|
90
|
-
post '/auth/:provider/callback', to: 'sessions#create'
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
And you might then have a `SessionsController` with code that looks
|
|
94
|
-
something like this:
|
|
95
|
-
|
|
96
|
-
```ruby
|
|
97
|
-
class SessionsController < ApplicationController
|
|
98
|
-
# If you're using a strategy that POSTs during callback, you'll need to skip the authenticity token check for the callback action only.
|
|
99
|
-
skip_before_action :verify_authenticity_token, only: :create
|
|
100
|
-
|
|
101
|
-
def create
|
|
102
|
-
@user = User.find_or_create_from_auth_hash(auth_hash)
|
|
103
|
-
self.current_user = @user
|
|
104
|
-
redirect_to '/'
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
protected
|
|
108
|
-
|
|
109
|
-
def auth_hash
|
|
110
|
-
request.env['omniauth.auth']
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
```
|
|
91
|
+
steps are necessary for your application.
|
|
114
92
|
|
|
115
93
|
The `omniauth.auth` key in the environment hash provides an
|
|
116
94
|
Authentication Hash which will contain information about the just
|
|
@@ -124,35 +102,74 @@ environment information on the callback request. It is entirely up to
|
|
|
124
102
|
you how you want to implement the particulars of your application's
|
|
125
103
|
authentication flow.
|
|
126
104
|
|
|
127
|
-
|
|
105
|
+
## rack_csrf
|
|
128
106
|
|
|
129
|
-
|
|
130
|
-
The `origin` url parameter is typically used to inform where a user came from and where, should you choose to use it, they'd want to return to.
|
|
107
|
+
`omniauth` is not OOTB-compatible with [rack_csrf](https://github.com/baldowl/rack_csrf). In order to do so, the following code needs to be added to the application bootstrapping code:
|
|
131
108
|
|
|
132
|
-
|
|
109
|
+
```ruby
|
|
110
|
+
OmniAuth::AuthenticityTokenProtection.default_options(key: "csrf.token", authenticity_param: "_csrf")
|
|
111
|
+
```
|
|
133
112
|
|
|
134
|
-
|
|
113
|
+
## Rails (without Devise)
|
|
114
|
+
To get started, add the following gems
|
|
115
|
+
|
|
116
|
+
**Gemfile**:
|
|
135
117
|
```ruby
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
# If blank, `omniauth.origin` is set to HTTP_REFERER
|
|
118
|
+
gem 'omniauth'
|
|
119
|
+
gem "omniauth-rails_csrf_protection"
|
|
139
120
|
```
|
|
140
121
|
|
|
141
|
-
|
|
122
|
+
Then insert OmniAuth as a middleware
|
|
123
|
+
|
|
124
|
+
**config/initializers/omniauth.rb**:
|
|
142
125
|
```ruby
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
126
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
127
|
+
provider :developer if Rails.env.development?
|
|
128
|
+
end
|
|
146
129
|
```
|
|
147
130
|
|
|
148
|
-
|
|
131
|
+
Additional providers can be added here in the future. Next we wire it
|
|
132
|
+
all up using routes, a controller and a login view.
|
|
133
|
+
|
|
134
|
+
**config/routes.rb**:
|
|
135
|
+
|
|
149
136
|
```ruby
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
provider :twitter, ENV['KEY'], ENV['SECRET'], origin_param: false
|
|
137
|
+
get 'auth/:provider/callback', to: 'sessions#create'
|
|
138
|
+
get '/login', to: 'sessions#new'
|
|
153
139
|
```
|
|
154
140
|
|
|
155
|
-
|
|
141
|
+
**app/controllers/sessions_controller.rb**:
|
|
142
|
+
```ruby
|
|
143
|
+
class SessionsController < ApplicationController
|
|
144
|
+
def new
|
|
145
|
+
render :new
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def create
|
|
149
|
+
user_info = request.env['omniauth.auth']
|
|
150
|
+
raise user_info # Your own session management should be placed here.
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**app/views/sessions/new.html.erb**:
|
|
156
|
+
```erb
|
|
157
|
+
<%= form_tag('/auth/developer', method: 'post', data: {turbo: false}) do %>
|
|
158
|
+
<button type='submit'>Login with Developer</button>
|
|
159
|
+
<% end %>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Now if you visit `/login` and click the Login button, you should see the
|
|
163
|
+
OmniAuth developer login screen. After submitting it, you are returned to your
|
|
164
|
+
application at `Sessions#create`. The raise should now display all the Omniauth
|
|
165
|
+
details you have available to integrate it into your own user management.
|
|
166
|
+
|
|
167
|
+
If you want out of the box usermanagement, you should consider using Omniauth
|
|
168
|
+
through Devise. Please visit the [Devise Github page](https://github.com/heartcombo/devise#omniauth)
|
|
169
|
+
for more information.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## Rails API
|
|
156
173
|
The following middleware are (by default) included for session management in
|
|
157
174
|
Rails applications. When using OmniAuth with a Rails API, you'll need to add
|
|
158
175
|
one of these required middleware back in:
|
|
@@ -191,6 +208,33 @@ to `STDOUT` but you can configure this using `OmniAuth.config.logger`:
|
|
|
191
208
|
OmniAuth.config.logger = Rails.logger
|
|
192
209
|
```
|
|
193
210
|
|
|
211
|
+
## Origin Param
|
|
212
|
+
The `origin` url parameter is typically used to inform where a user came from
|
|
213
|
+
and where, should you choose to use it, they'd want to return to.
|
|
214
|
+
Omniauth supports the following settings which can be configured on a provider level:
|
|
215
|
+
|
|
216
|
+
**Default**:
|
|
217
|
+
```ruby
|
|
218
|
+
provider :twitter, ENV['KEY'], ENV['SECRET']
|
|
219
|
+
POST /auth/twitter/?origin=[URL]
|
|
220
|
+
# If the `origin` parameter is blank, `omniauth.origin` is set to HTTP_REFERER
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Using a differently named origin parameter**:
|
|
224
|
+
```ruby
|
|
225
|
+
provider :twitter, ENV['KEY'], ENV['SECRET'], origin_param: 'return_to'
|
|
226
|
+
POST /auth/twitter/?return_to=[URL]
|
|
227
|
+
# If the `return_to` parameter is blank, `omniauth.origin` is set to HTTP_REFERER
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Disabled**:
|
|
231
|
+
```ruby
|
|
232
|
+
provider :twitter, ENV['KEY'], ENV['SECRET'], origin_param: false
|
|
233
|
+
POST /auth/twitter
|
|
234
|
+
# This means the origin should be handled by your own application.
|
|
235
|
+
# Note that `omniauth.origin` will always be blank.
|
|
236
|
+
```
|
|
237
|
+
|
|
194
238
|
## Resources
|
|
195
239
|
The [OmniAuth Wiki](https://github.com/omniauth/omniauth/wiki) has
|
|
196
240
|
actively maintained in-depth documentation for OmniAuth. It should be
|
|
@@ -201,10 +245,14 @@ OmniAuth, how it works, and how to use it.
|
|
|
201
245
|
|
|
202
246
|
Available as part of the Tidelift Subscription.
|
|
203
247
|
|
|
204
|
-
The maintainers of OmniAuth and thousands of other packages are working with
|
|
248
|
+
The maintainers of OmniAuth and thousands of other packages are working with
|
|
249
|
+
Tidelift to deliver commercial support and maintenance for the open source
|
|
250
|
+
packages you use to build your applications. Save time, reduce risk, and
|
|
251
|
+
improve code health, while paying the maintainers of the exact packages you use.
|
|
252
|
+
[Learn more.](https://tidelift.com/subscription/pkg/rubygems-omniauth?utm_source=undefined&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
|
205
253
|
|
|
206
254
|
## Supported Ruby Versions
|
|
207
|
-
OmniAuth is tested under 2.5, 2.6, 2.7, truffleruby, and JRuby.
|
|
255
|
+
OmniAuth is tested under 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, truffleruby, and JRuby.
|
|
208
256
|
|
|
209
257
|
## Versioning
|
|
210
258
|
This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations
|
data/SECURITY.md
CHANGED
data/lib/omniauth/builder.rb
CHANGED
|
@@ -26,7 +26,7 @@ module OmniAuth
|
|
|
26
26
|
@options = options
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def provider(klass, *args, &block)
|
|
29
|
+
def provider(klass, *args, **opts, &block)
|
|
30
30
|
if klass.is_a?(Class)
|
|
31
31
|
middleware = klass
|
|
32
32
|
else
|
|
@@ -37,8 +37,7 @@ module OmniAuth
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
use middleware, *args, &block
|
|
40
|
+
use middleware, *args, **options.merge(opts), &block
|
|
42
41
|
end
|
|
43
42
|
|
|
44
43
|
def call(env)
|
data/lib/omniauth/form.rb
CHANGED
|
@@ -7,6 +7,7 @@ module OmniAuth
|
|
|
7
7
|
def initialize(options = {})
|
|
8
8
|
options[:title] ||= 'Authentication Info Required'
|
|
9
9
|
options[:header_info] ||= ''
|
|
10
|
+
options[:method] ||= 'post'
|
|
10
11
|
self.options = options
|
|
11
12
|
|
|
12
13
|
@html = +'' # unary + string allows it to be mutable if strings are frozen
|
|
@@ -75,7 +76,7 @@ module OmniAuth
|
|
|
75
76
|
</head>
|
|
76
77
|
<body>
|
|
77
78
|
<h1>#{title}</h1>
|
|
78
|
-
<form method='
|
|
79
|
+
<form method='#{options[:method]}' #{"action='#{options[:url]}' " if options[:url]}noValidate='noValidate'>
|
|
79
80
|
HTML
|
|
80
81
|
self
|
|
81
82
|
end
|
|
@@ -35,7 +35,7 @@ module OmniAuth
|
|
|
35
35
|
option :uid_field, :email
|
|
36
36
|
|
|
37
37
|
def request_phase
|
|
38
|
-
form = OmniAuth::Form.new(:title => 'User Info', :url => callback_path)
|
|
38
|
+
form = OmniAuth::Form.new(:title => 'User Info', :url => callback_path, :method => 'get')
|
|
39
39
|
options.fields.each do |field|
|
|
40
40
|
form.text_field field.to_s.capitalize.tr('_', ' '), field.to_s
|
|
41
41
|
end
|
data/lib/omniauth/strategy.rb
CHANGED
data/lib/omniauth/version.rb
CHANGED
data/lib/omniauth.rb
CHANGED
data/omniauth.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ require 'omniauth/version'
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |spec|
|
|
8
8
|
spec.add_dependency 'hashie', ['>= 3.4.6']
|
|
9
|
-
spec.add_dependency 'rack',
|
|
9
|
+
spec.add_dependency 'rack', '>= 2.2.3'
|
|
10
10
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
11
11
|
spec.add_dependency 'rack-protection'
|
|
12
12
|
spec.add_development_dependency 'rake', '~> 12.0'
|
metadata
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Bleigh
|
|
8
8
|
- Erik Michaels-Ober
|
|
9
9
|
- Tom Milewski
|
|
10
|
-
autorequire:
|
|
10
|
+
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2023-12-19 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: hashie
|
|
@@ -32,20 +32,14 @@ dependencies:
|
|
|
32
32
|
requirements:
|
|
33
33
|
- - ">="
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version:
|
|
36
|
-
- - "<"
|
|
37
|
-
- !ruby/object:Gem::Version
|
|
38
|
-
version: '3'
|
|
35
|
+
version: 2.2.3
|
|
39
36
|
type: :runtime
|
|
40
37
|
prerelease: false
|
|
41
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
42
39
|
requirements:
|
|
43
40
|
- - ">="
|
|
44
41
|
- !ruby/object:Gem::Version
|
|
45
|
-
version:
|
|
46
|
-
- - "<"
|
|
47
|
-
- !ruby/object:Gem::Version
|
|
48
|
-
version: '3'
|
|
42
|
+
version: 2.2.3
|
|
49
43
|
- !ruby/object:Gem::Dependency
|
|
50
44
|
name: bundler
|
|
51
45
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -99,7 +93,10 @@ extra_rdoc_files: []
|
|
|
99
93
|
files:
|
|
100
94
|
- ".github/FUNDING.yml"
|
|
101
95
|
- ".github/ISSUE_TEMPLATE.md"
|
|
96
|
+
- ".github/dependabot.yml"
|
|
97
|
+
- ".github/workflows/jruby.yml"
|
|
102
98
|
- ".github/workflows/main.yml"
|
|
99
|
+
- ".github/workflows/truffle_ruby.yml"
|
|
103
100
|
- ".gitignore"
|
|
104
101
|
- ".rspec"
|
|
105
102
|
- ".rubocop.yml"
|
|
@@ -129,7 +126,7 @@ homepage: https://github.com/omniauth/omniauth
|
|
|
129
126
|
licenses:
|
|
130
127
|
- MIT
|
|
131
128
|
metadata: {}
|
|
132
|
-
post_install_message:
|
|
129
|
+
post_install_message:
|
|
133
130
|
rdoc_options: []
|
|
134
131
|
require_paths:
|
|
135
132
|
- lib
|
|
@@ -144,8 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
144
141
|
- !ruby/object:Gem::Version
|
|
145
142
|
version: 1.3.5
|
|
146
143
|
requirements: []
|
|
147
|
-
rubygems_version: 3.
|
|
148
|
-
signing_key:
|
|
144
|
+
rubygems_version: 3.3.26
|
|
145
|
+
signing_key:
|
|
149
146
|
specification_version: 4
|
|
150
147
|
summary: A generalized Rack framework for multiple-provider authentication.
|
|
151
148
|
test_files: []
|