devise-two-factor 5.1.0 → 6.1.0

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: c55843526e6b06f1804f07a6c38bd6a247006d90ba43a5f6659cb8c0f98d53ff
4
- data.tar.gz: e0e67eab0624fa0fa88f9719afbbc1da169bcf280f60d249efd96bc98ad10629
3
+ metadata.gz: 84d4fba8bbdcee4f8d8b00c5d2662dc5e8d78cc60e7f0502c7e0e9d5fc93a4d4
4
+ data.tar.gz: 33a77876910f588992917ebb123148f26d82b26fbe713f944e59f3b720c4978c
5
5
  SHA512:
6
- metadata.gz: cc10ef88ba898b09fd310dc3015853027b8120915d35c2c491dad9976d5809981486efc4d49e4d44abdbf01573ca643de31029a279bffc43609b92e8101cf0eb
7
- data.tar.gz: 2dd29e26cc88edcea8044f6acf22d55275550d9d5c02cbc07337f1509b7b61de766b9e2ab6f1cc436ee569c016fea51130b4bff42853088807c576e2c363f9d0
6
+ metadata.gz: d2f69c9f760278e3a1a40d5913b786468d9d4d12b54e93dd5d5437cfb5edc669f21a56953ea817d66722cbe305190762dcb86cef80009a0fff718e86a39726be
7
+ data.tar.gz: e3086e4034e6208e064f81e5845b1027b5e7c19d38ddd4788c615fe1a837772f1330aba234a30fb3f7f9cc549dbed3864da9f70249aef04b9efa066c8284733c
@@ -13,7 +13,10 @@ jobs:
13
13
  matrix:
14
14
  # Due to https://github.com/actions/runner/issues/849, we should quote versions
15
15
  ruby: ['3.1', '3.2', '3.3', 'truffleruby-head']
16
- rails: ['7.0', '7.1']
16
+ rails: ['7.0', '7.1', '7.2', '8.0']
17
+ exclude:
18
+ - ruby: '3.1'
19
+ rails: '8.0'
17
20
 
18
21
  name: Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }}
19
22
  env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
@@ -0,0 +1,28 @@
1
+ name: Push Gem
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - v*
7
+
8
+ jobs:
9
+ deployment:
10
+ name: Push gem to RubyGems.org
11
+ environment: RubyGems
12
+ runs-on: ubuntu-latest
13
+
14
+ permissions:
15
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
16
+ contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
17
+
18
+ steps:
19
+ # Set up
20
+ - uses: actions/checkout@v4
21
+ - name: Set up Ruby
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ bundler-cache: true
25
+ ruby-version: ruby
26
+
27
+ # Release
28
+ - uses: rubygems/release-gem@v1
@@ -0,0 +1,6 @@
1
+ {
2
+ "MD026": false,
3
+ "MD029": false,
4
+ "MD031": false,
5
+ "MD034": false
6
+ }
data/Appraisals CHANGED
@@ -1,39 +1,19 @@
1
- appraise "rails-4.1" do
2
- gem 'railties', '~> 4.1'
3
- gem 'activesupport', '~> 4.1'
4
- end
5
-
6
- appraise "rails-4.2" do
7
- gem 'railties', '~> 4.2'
8
- gem 'activesupport', '~> 4.2'
9
- end
10
-
11
- appraise "rails-5.0" do
12
- gem 'railties', '~> 5.0'
13
- gem 'activesupport', '~> 5.0'
14
- end
15
-
16
- appraise "rails-5.1" do
17
- gem 'railties', '~> 5.1'
18
- gem 'activesupport', '~> 5.1'
19
- end
20
-
21
- appraise "rails-5.2" do
22
- gem 'railties', '~> 5.2'
23
- gem 'activesupport', '~> 5.2'
1
+ appraise "rails-7.0" do
2
+ gem 'railties', '~> 7.0.0'
3
+ gem 'activesupport', '~> 7.0.0'
24
4
  end
25
5
 
26
- appraise "rails-6.0" do
27
- gem 'railties', '~> 6.0'
28
- gem 'activesupport', '~> 6.0'
6
+ appraise "rails-7.1" do
7
+ gem 'railties', '~> 7.1.0'
8
+ gem 'activesupport', '~> 7.1.0'
29
9
  end
30
10
 
31
- appraise "rails-6.1" do
32
- gem 'railties', '~> 6.1'
33
- gem 'activesupport', '~> 6.1'
11
+ appraise "rails-7.2" do
12
+ gem 'railties', '~> 7.2.0'
13
+ gem 'activesupport', '~> 7.2.0'
34
14
  end
35
15
 
36
- appraise "rails-7.0" do
37
- gem 'railties', '~> 7.0'
38
- gem 'activesupport', '~> 7.0'
16
+ appraise "rails-8.0" do
17
+ gem 'railties', '~> 8.0.0'
18
+ gem 'activesupport', '~> 8.0.0'
39
19
  end
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 6.0.0
6
+
7
+ **Breaking Changes**
8
+ - `otp_secret_length` and `otp_backup_code_length` options have changed to be the number of random bytes that are generated. See [UPGRADING.md](UPGRADING.md).
9
+ - `consume_otp!` and `invalidate_otp_backup_code!` now call `save!` instead of `save`. See [UPGRADING.md](UPGRADING.md).
10
+
5
11
  ## 5.1.0
6
12
 
7
13
  - Remove faker dev dependency
data/README.md CHANGED
@@ -15,9 +15,7 @@ We welcome pull requests, bug reports, and other contributions. We're especially
15
15
 
16
16
  ## Example App
17
17
 
18
- An example Rails 4 application is provided in the `demo` directory. It showcases a minimal example of Devise-Two-Factor in action, and can act as a reference for integrating the gem into your own application.
19
-
20
- For the demo app to work, create an encryption key and store it as an environment variable. One way to do this is to create a file named `local_env.yml` in the application root. Set the value of `ENCRYPTION_KEY` in the YML file. That value will be loaded into the application environment by `application.rb`.
18
+ See [examples](demo/README.md).
21
19
 
22
20
  ## Getting Started
23
21
 
data/Rakefile CHANGED
@@ -11,6 +11,8 @@ rescue Bundler::BundlerError => e
11
11
  end
12
12
  require 'rake'
13
13
 
14
+ require 'bundler/gem_tasks'
15
+
14
16
  require 'rspec/core'
15
17
  require 'rspec/core/rake_task'
16
18
  RSpec::Core::RakeTask.new(:spec) do |spec|
data/SECURITY.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  ## Reporting a Vulnerability
4
4
 
5
- Please report any vulnerabilities to the [Synopsys PSIRT](https://www.synopsys.com/company/legal/vulnerability-disclosure-policy.html).
5
+ Please report any vulnerabilities to the [Black Duck PSIRT](psirt@blackduck.com).
data/UPGRADING.md CHANGED
@@ -1,8 +1,25 @@
1
- # Upgrading from 4.x to 5.x
1
+ # Upgrading
2
2
 
3
- ## Background
3
+ ## Upgrading from 5.x to 6.x
4
4
 
5
- ### Database columns in version 4.x and older
5
+ ### save!
6
+
7
+ `consume_otp!` and `invalidate_otp_backup_code!` now call `save!` instead of `save` (or nothing at all in the case of `invalidate_otp_backup_code!`). If you manually called `save`/`save!` after calling `invalidate_otp_backup_code!` you may be able to remove it.
8
+
9
+ ### Secret Lengths
10
+
11
+ The `otp_secret_length` and `otp_backup_code_length` options have changed to be the number of random bytes that are generated.
12
+ If you had configured these values you may want to change them if you wish to keep the same output length.
13
+
14
+ `otp_secret_length` now has a default value of 20, generating a 160 bit secret key with an output length length of 32 bytes.
15
+
16
+ `otp_backup_code_length` now has a default value of 16, generating a 32 byte backup code.
17
+
18
+ ## Upgrading from 4.x to 5.x
19
+
20
+ ### Background
21
+
22
+ #### Database columns in version 4.x and older
6
23
 
7
24
  Versions 4.x and older stored the OTP secret in an attribute called `encrypted_otp_secret` using the [attr_encrypted](https://github.com/attr-encrypted/attr_encrypted) gem. This gem is currently unmaintained which is part of the motivation for moving to Rails encrypted attributes. This attribute was backed by three database columns:
8
25
 
@@ -21,7 +38,7 @@ otp_required_for_login
21
38
 
22
39
  A fresh install of 4.x would create all five of the database columns above.
23
40
 
24
- ### Database columns in version 5.x and later
41
+ #### Database columns in version 5.x and later
25
42
 
26
43
  Versions 5+ of this gem uses a single [Rails 7+ encrypted attribute](https://edgeguides.rubyonrails.org/active_record_encryption.html) named `otp_secret`to store the OTP secret in the database table (usually `users` but will be whatever model you picked).
27
44
 
@@ -33,18 +50,15 @@ consumed_timestep
33
50
  otp_required_for_login
34
51
  ```
35
52
 
36
- ### Upgrading from 4.x to 5.x
37
-
38
-
39
53
  We have attempted to make the upgrade as painless as possible but unfortunately because of the secret storage change, it cannot be as simple as `bundle update devise-two-factor` :heart:
40
54
 
41
- #### Assumptions
55
+ ### Assumptions
42
56
 
43
57
  This guide assumes you are upgrading an existing Rails 6 app (with `devise` and `devise-two-factor`) to Rails 7.
44
58
 
45
59
  This gem must be upgraded **as part of a Rails 7 upgrade**. See [the official Rails upgrading guide](https://guides.rubyonrails.org/upgrading_ruby_on_rails.html) for an overview of upgrading Rails.
46
60
 
47
- #### Phase 1: Upgrading devise-two-factor as part of Rails 7 upgrade
61
+ ### Phase 1: Upgrading devise-two-factor as part of Rails 7 upgrade
48
62
 
49
63
  1. Update the version constraint for Rails in your `Gemfile` to your desired version e.g. `gem "rails", "~> 7.0.3"`
50
64
  1. Run `bundle install` and resolve any issues with dependencies.
@@ -149,7 +163,7 @@ You can now deploy your upgraded application and devise-two-factor should work a
149
163
 
150
164
  This gem will fall back to **reading** the OTP secret from the legacy columns if it cannot find one in the new `otp_secret` column. When you **write** a new OTP secret it will always be written to the new `otp_secret` column.
151
165
 
152
- #### Phase 2: Clean up
166
+ ### Phase 2: Clean up
153
167
 
154
168
  This "clean up" phase can happen at the same time as your initial deployment but teams managing existing apps will likely want to do clean-up as separate, later deployments.
155
169
 
@@ -200,7 +214,7 @@ This "clean up" phase can happen at the same time as your initial deployment but
200
214
  devise :two_factor_authenticatable
201
215
  ```
202
216
 
203
- # Guide to upgrading from 2.x to 3.x
217
+ ## Upgrading from 2.x to 3.x
204
218
 
205
219
  Pull request #76 allows for compatibility with `attr_encrypted` 3.0, which should be used due to a security vulnerability discovered in 2.0.
206
220
 
@@ -220,7 +234,7 @@ class User < ActiveRecord::Base
220
234
  :otp_secret_encryption_key => ENV['DEVISE_TWO_FACTOR_ENCRYPTION_KEY']
221
235
  ```
222
236
 
223
- # Guide to upgrading from 1.x to 2.x
237
+ ## Upgrading from 1.x to 2.x
224
238
 
225
239
  Pull request #43 added a new field to protect against "shoulder-surfing" attacks. If upgrading, you'll need to add the `:consumed_timestep` column to your `Users` model.
226
240
 
@@ -11,17 +11,12 @@ Gem::Specification.new do |s|
11
11
  s.description = 'Devise-Two-Factor is a minimalist extension to Devise which offers support for two-factor authentication through the TOTP scheme.'
12
12
  s.authors = ['Quinn Wilton']
13
13
 
14
- s.cert_chain = [
15
- 'certs/tinfoil-cacert.pem',
16
- 'certs/tinfoilsecurity-gems-cert.pem'
17
- ]
18
- s.signing_key = File.expand_path("~/.ssh/tinfoilsecurity-gems-key.pem") if $0 =~ /gem\z/
19
14
  s.files = `git ls-files`.split("\n").delete_if { |x| x.match('demo/*') }
20
15
  s.test_files = `git ls-files -- spec/*`.split("\n")
21
16
  s.require_paths = ['lib']
22
17
 
23
- s.add_runtime_dependency 'railties', '~> 7.0'
24
- s.add_runtime_dependency 'activesupport', '~> 7.0'
18
+ s.add_runtime_dependency 'railties', '>= 7.0', '< 8.1'
19
+ s.add_runtime_dependency 'activesupport', '>= 7.0', '< 8.1'
25
20
  s.add_runtime_dependency 'devise', '~> 4.0'
26
21
  s.add_runtime_dependency 'rotp', '~> 6.0'
27
22
 
@@ -30,4 +25,5 @@ Gem::Specification.new do |s|
30
25
  s.add_development_dependency 'bundler', '> 1.0'
31
26
  s.add_development_dependency 'rspec', '> 3'
32
27
  s.add_development_dependency 'simplecov'
28
+ s.add_development_dependency 'rake', '~> 13'
33
29
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "railties", "~> 7.2.0"
6
+ gem "activesupport", "~> 7.2.0"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "railties", "~> 8.0.0"
6
+ gem "activesupport", "~> 8.0.0"
7
+
8
+ gemspec path: "../"
@@ -3,9 +3,10 @@ require 'devise_two_factor/models'
3
3
  require 'devise_two_factor/strategies'
4
4
 
5
5
  module Devise
6
- # The length of generated OTP secrets
6
+ # The length of randomly generated OTP shared secret (in bytes).
7
+ # The secrets will be base32-encoded and have a length 1.6 times the configured value.
7
8
  mattr_accessor :otp_secret_length
8
- @@otp_secret_length = 24
9
+ @@otp_secret_length = 20
9
10
 
10
11
  # The number of seconds before and after the current
11
12
  # time for which codes will be accepted
@@ -20,7 +21,8 @@ module Devise
20
21
  mattr_accessor :otp_encrypted_attribute_options
21
22
  @@otp_encrypted_attribute_options = {}
22
23
 
23
- # The length of all generated OTP backup codes
24
+ # The length of randomly generated OTP backup codes (in bytes).
25
+ # The codes will be hex-encoded and have a length twice the configured value.
24
26
  mattr_accessor :otp_backup_code_length
25
27
  @@otp_backup_code_length = 16
26
28
 
@@ -81,7 +81,8 @@ module Devise
81
81
  def consume_otp!
82
82
  if self.consumed_timestep != current_otp_timestep
83
83
  self.consumed_timestep = current_otp_timestep
84
- return save(validate: false)
84
+ save!(validate: false)
85
+ return true
85
86
  end
86
87
 
87
88
  false
@@ -93,8 +94,9 @@ module Devise
93
94
  :otp_encrypted_attribute_options,
94
95
  :otp_secret_encryption_key)
95
96
 
97
+ # Geneartes an OTP secret of the specified length, returning it after Base32 encoding.
96
98
  def generate_otp_secret(otp_secret_length = self.otp_secret_length)
97
- ROTP::Base32.random_base32(otp_secret_length)
99
+ ROTP::Base32.random(otp_secret_length)
98
100
  end
99
101
 
100
102
  # Return value will be splatted with ** so return a version of the
@@ -20,7 +20,7 @@ module Devise
20
20
  code_length = self.class.otp_backup_code_length
21
21
 
22
22
  number_of_codes.times do
23
- codes << SecureRandom.hex(code_length / 2) # Hexstring has length 2*n
23
+ codes << SecureRandom.hex(code_length)
24
24
  end
25
25
 
26
26
  hashed_codes = codes.map { |code| Devise::Encryptor.digest(self.class, code) }
@@ -39,6 +39,7 @@ module Devise
39
39
 
40
40
  codes.delete(backup_code)
41
41
  self.otp_backup_codes = codes
42
+ save!(validate: false)
42
43
  return true
43
44
  end
44
45
 
@@ -13,8 +13,8 @@ RSpec.shared_examples 'two_factor_authenticatable' do
13
13
  end
14
14
 
15
15
  describe '#otp_secret' do
16
- it 'should be of the configured length' do
17
- expect(subject.otp_secret.length).to eq(subject.class.otp_secret_length)
16
+ it 'should be of the expected length' do
17
+ expect(subject.otp_secret.length).to eq(subject.class.otp_secret_length*8/5)
18
18
  end
19
19
  end
20
20
 
@@ -129,11 +129,11 @@ RSpec.shared_examples 'two_factor_authenticatable' do
129
129
  let(:issuer) { 'Tinfoil' }
130
130
 
131
131
  it 'should return uri with specified account' do
132
- expect(subject.otp_provisioning_uri(account)).to match(%r{otpauth://totp/#{CGI.escape(account)}\?secret=\w{#{otp_secret_length}}})
132
+ expect(subject.otp_provisioning_uri(account)).to match(%r{otpauth://totp/#{CGI.escape(account)}\?secret=\w{#{otp_secret_length*8/5}}})
133
133
  end
134
134
 
135
135
  it 'should return uri with issuer option' do
136
- expect(subject.otp_provisioning_uri(account, issuer: issuer)).to match(%r{otpauth://totp/#{issuer}:#{CGI.escape(account)}\?.*secret=\w{#{otp_secret_length}}(&|$)})
136
+ expect(subject.otp_provisioning_uri(account, issuer: issuer)).to match(%r{otpauth://totp/#{issuer}:#{CGI.escape(account)}\?.*secret=\w{#{otp_secret_length*8/5}}(&|$)})
137
137
  expect(subject.otp_provisioning_uri(account, issuer: issuer)).to match(%r{otpauth://totp/#{issuer}:#{CGI.escape(account)}\?.*issuer=#{issuer}(&|$)})
138
138
  end
139
139
  end
@@ -17,7 +17,7 @@ RSpec.shared_examples 'two_factor_backupable' do
17
17
 
18
18
  it 'generates recovery codes of the correct length' do
19
19
  @plaintext_codes.each do |code|
20
- expect(code.length).to eq(subject.class.otp_backup_code_length)
20
+ expect(code.length).to eq(subject.class.otp_backup_code_length*2)
21
21
  end
22
22
  end
23
23
 
@@ -6,9 +6,6 @@ module Devise
6
6
  resource = mapping.to.find_for_database_authentication(authentication_hash)
7
7
 
8
8
  if validate(resource) { resource.invalidate_otp_backup_code!(params[scope]['otp_attempt']) }
9
- # Devise fails to authenticate invalidated resources, but if we've
10
- # gotten here, the object changed (Since we deleted a recovery code)
11
- resource.save!
12
9
  super
13
10
  end
14
11
 
@@ -1,3 +1,3 @@
1
1
  module DeviseTwoFactor
2
- VERSION = '5.1.0'.freeze
2
+ VERSION = '6.1.0'.freeze
3
3
  end
@@ -18,7 +18,7 @@ class TwoFactorAuthenticatableDouble
18
18
 
19
19
  attr_accessor :consumed_timestep
20
20
 
21
- def save(validate)
21
+ def save!(_)
22
22
  # noop for testing
23
23
  true
24
24
  end
@@ -17,6 +17,10 @@ class TwoFactorBackupableDouble
17
17
  devise :two_factor_authenticatable, :two_factor_backupable
18
18
 
19
19
  attr_accessor :otp_backup_codes
20
+
21
+ def save!(_)
22
+ true
23
+ end
20
24
  end
21
25
 
22
26
  describe ::Devise::Models::TwoFactorBackupable do
metadata CHANGED
@@ -1,121 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-two-factor
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quinn Wilton
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIHSjCCBTKgAwIBAgIJAK2u0LojMCNgMA0GCSqGSIb3DQEBBQUAMIGcMQswCQYD
14
- VQQGEwJVUzELMAkGA1UECBMCQ0ExEjAQBgNVBAcTCVBhbG8gQWx0bzEfMB0GA1UE
15
- ChMWVGluZm9pbCBTZWN1cml0eSwgSW5jLjEfMB0GA1UEAxMWVGluZm9pbCBTZWN1
16
- cml0eSwgSW5jLjEqMCgGCSqGSIb3DQEJARYbc3VwcG9ydEB0aW5mb2lsc2VjdXJp
17
- dHkuY29tMB4XDTIxMDkwOTE4MjIwMFoXDTI1MDkwOTE4MjIwMFowgZwxCzAJBgNV
18
- BAYTAlVTMQswCQYDVQQIEwJDQTESMBAGA1UEBxMJUGFsbyBBbHRvMR8wHQYDVQQK
19
- ExZUaW5mb2lsIFNlY3VyaXR5LCBJbmMuMR8wHQYDVQQDExZUaW5mb2lsIFNlY3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Q9Hi6Hh8z+Le9iR4I49vPEWDQEvj35IT6VfwU79UfIOlX+DkW8fFkPbaut3Se
86
- vqIDv6JBG9I16h/HhchntKfM58MI1bNZFBSdZqYOJiL8JIjP8HNIk76Y366ppG29
87
- EhBYYg==
88
- -----END CERTIFICATE-----
89
- date: 2024-06-18 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2024-11-11 00:00:00.000000000 Z
90
12
  dependencies:
91
13
  - !ruby/object:Gem::Dependency
92
14
  name: railties
93
15
  requirement: !ruby/object:Gem::Requirement
94
16
  requirements:
95
- - - "~>"
17
+ - - ">="
96
18
  - !ruby/object:Gem::Version
97
19
  version: '7.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '8.1'
98
23
  type: :runtime
99
24
  prerelease: false
100
25
  version_requirements: !ruby/object:Gem::Requirement
101
26
  requirements:
102
- - - "~>"
27
+ - - ">="
103
28
  - !ruby/object:Gem::Version
104
29
  version: '7.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '8.1'
105
33
  - !ruby/object:Gem::Dependency
106
34
  name: activesupport
107
35
  requirement: !ruby/object:Gem::Requirement
108
36
  requirements:
109
- - - "~>"
37
+ - - ">="
110
38
  - !ruby/object:Gem::Version
111
39
  version: '7.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '8.1'
112
43
  type: :runtime
113
44
  prerelease: false
114
45
  version_requirements: !ruby/object:Gem::Requirement
115
46
  requirements:
116
- - - "~>"
47
+ - - ">="
117
48
  - !ruby/object:Gem::Version
118
49
  version: '7.0'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '8.1'
119
53
  - !ruby/object:Gem::Dependency
120
54
  name: devise
121
55
  requirement: !ruby/object:Gem::Requirement
@@ -214,6 +148,20 @@ dependencies:
214
148
  - - ">="
215
149
  - !ruby/object:Gem::Version
216
150
  version: '0'
151
+ - !ruby/object:Gem::Dependency
152
+ name: rake
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - "~>"
156
+ - !ruby/object:Gem::Version
157
+ version: '13'
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: '13'
217
165
  description: Devise-Two-Factor is a minimalist extension to Devise which offers support
218
166
  for two-factor authentication through the TOTP scheme.
219
167
  email:
@@ -223,7 +171,9 @@ extra_rdoc_files: []
223
171
  files:
224
172
  - ".github/dependabot.yml"
225
173
  - ".github/workflows/ci.yml"
174
+ - ".github/workflows/push.yml"
226
175
  - ".gitignore"
176
+ - ".markdownlint.json"
227
177
  - ".rspec"
228
178
  - Appraisals
229
179
  - CHANGELOG.md
@@ -234,11 +184,11 @@ files:
234
184
  - Rakefile
235
185
  - SECURITY.md
236
186
  - UPGRADING.md
237
- - certs/tinfoil-cacert.pem
238
- - certs/tinfoilsecurity-gems-cert.pem
239
187
  - devise-two-factor.gemspec
240
188
  - gemfiles/rails_7.0.gemfile
241
189
  - gemfiles/rails_7.1.gemfile
190
+ - gemfiles/rails_7.2.gemfile
191
+ - gemfiles/rails_8.0.gemfile
242
192
  - lib/devise-two-factor.rb
243
193
  - lib/devise_two_factor/models.rb
244
194
  - lib/devise_two_factor/models/two_factor_authenticatable.rb
@@ -273,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
223
  - !ruby/object:Gem::Version
274
224
  version: '0'
275
225
  requirements: []
276
- rubygems_version: 3.0.3.1
226
+ rubygems_version: 3.5.22
277
227
  signing_key:
278
228
  specification_version: 4
279
229
  summary: Barebones two-factor authentication with Devise
checksums.yaml.gz.sig DELETED
Binary file
@@ -1,41 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIHSjCCBTKgAwIBAgIJAK2u0LojMCNgMA0GCSqGSIb3DQEBBQUAMIGcMQswCQYD
3
- VQQGEwJVUzELMAkGA1UECBMCQ0ExEjAQBgNVBAcTCVBhbG8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SpgAToMz3xrhA8fPt5UkKhkDkPFYBF
27
- 5htKVipyijChWsXyt33YM2qGaavTEXzxza1I99PGNRKxUMvbSMas4YaLqkBpQSc+
28
- mcrLWYPiXWsePGu+j08AypE2Ubp4AOSZJN9rBBGotC3gofipo+K/sBiOM9xXI76Q
29
- 0HYOxXPa7D7UQQG1R9i0rcxmf9qepIVYCldmqVkKKDizcDo5UI9lRiLFjDyQhn6l
30
- YFY9bPQ4lKTK5Jr3M6+dV7fHxLhqXyMGs1905IUb7qvB7Bq/f0qJfC0JZuY/qdn2
31
- lL0SeFKOVsjErtobh3u8p8j2USkc8uJgIANHpXEMEExdp899CV/eVjh3TpAR7E6T
32
- mg7Q9Hi6Hh8z+Le9iR4I49vPEWDQEvj35IT6VfwU79UfIOlX+DkW8fFkPbaut3Se
33
- vqIDv6JBG9I16h/HhchntKfM58MI1bNZFBSdZqYOJiL8JIjP8HNIk76Y366ppG29
34
- EhBYYg==
35
- -----END CERTIFICATE-----
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file