passwordless 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: d3bdc9fe84110cc587576344e493cbe16a0a9a74
4
- data.tar.gz: 1d7558d9be99a4764c21eb6fda029a765a9540bb
3
+ metadata.gz: 717a5f675e50cbb57b59ee2138833bd2847dd71c
4
+ data.tar.gz: 2487b137a19da048afaabc061f648a7aee659e62
5
5
  SHA512:
6
- metadata.gz: 6ec72945db7eec026bd640a3116c82fc9b5eea790cea4405bf9593815ed2e02edc3d91e58c82bdc52122a6190e512eb8013e51ca198d0b47cd961491d5f471aa
7
- data.tar.gz: 0ca8c6e2e4d6bed6fab0351200acef5ac9e65a1526c2cd7503d751d967da8fd96d7200d005310600af693af00fde068aee7541b185e8969612342f32155dca4a
6
+ metadata.gz: b72b379c9acd55088adabd5f0a0bad5a42f24c1e55c600896e6284e8ff54b1f9e21c0111037c7d112c6bf5df6bdc3c1bed43298e0d6e8c1495a9af8c573a0753
7
+ data.tar.gz: 6234dd6216fd0fecd79860b3d3277460a665001e657656c3023dae4a1ea72ae1619750e27e6fde6115e39d5d1ecec712155271effa3a7da7e0595efcf6ae4745
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align='center'>
2
- <img src='https://s3.brnbw.com/Passwordless-title-JO71NQv7Q0.svg' alt='Passwordless' />
2
+ <img src='https://s3.brnbw.com/Passwordless-title-gaIVkX0sPg.svg' alt='Passwordless' />
3
3
  <br />
4
4
  <br />
5
5
  </p>
@@ -91,7 +91,7 @@ See [the bundled views](https://github.com/mikker/passwordless/tree/master/app/v
91
91
 
92
92
  ## Registering new users
93
93
 
94
- Because your `User` record is just any other record, you just create one like you normally would. Passwordless provides a helper method you can use to sign in the created user after it is saved like so:
94
+ Because your `User` record is like any other record, you create one like you normally would. Passwordless provides a helper method you can use to sign in the created user after it is saved like so:
95
95
 
96
96
  ```ruby
97
97
  class UsersController < ApplicationController
@@ -1,3 +1,5 @@
1
+ require 'bcrypt'
2
+
1
3
  module Passwordless
2
4
  class SessionsController < ApplicationController
3
5
  include ControllerHelpers
@@ -30,6 +32,9 @@ module Passwordless
30
32
  end
31
33
 
32
34
  def show
35
+ # Make it "slow" on purpose to make brute-force attacks more of a hassle
36
+ BCrypt::Password.create(params[:token])
37
+
33
38
  session = Session.valid.find_by!(
34
39
  authenticatable_type: authenticatable_classname,
35
40
  token: params[:token]
@@ -1,3 +1,3 @@
1
1
  module Passwordless
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passwordless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 5.1.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: bcrypt
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.1.11
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.1.11
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: sqlite3
29
43
  requirement: !ruby/object:Gem::Requirement