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 +4 -4
- data/README.md +2 -2
- data/app/controllers/passwordless/sessions_controller.rb +5 -0
- data/lib/passwordless/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 717a5f675e50cbb57b59ee2138833bd2847dd71c
|
4
|
+
data.tar.gz: 2487b137a19da048afaabc061f648a7aee659e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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-
|
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
|
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]
|
data/lib/passwordless/version.rb
CHANGED
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.
|
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-
|
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
|