userbin 1.0.0 → 1.0.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 +5 -5
- data/lib/userbin/helpers.rb +1 -1
- data/lib/userbin/jwt.rb +1 -1
- data/lib/userbin/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c4998d7789d069fdc0593e1c812e683835662a9
|
4
|
+
data.tar.gz: e1e68fe884e676c1eee457360c3ad70a1016fbdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff654994eedfd02d0dc47b36b394f591b7750b001d47a3e2a70615eaf85837068554f9f346acb2fe9b7a9321906a7a58d2b385346fbcc6202bcf587e5da001ca
|
7
|
+
data.tar.gz: ee0e9b17121cb7e7240245ba395849b06125f7a28c4f86aace4fec3473a799dfd2547834a7f17b8c90ec1f77da94f548fed255def25becea6be8f9f11d9c43cd
|
data/README.md
CHANGED
@@ -72,7 +72,7 @@ The second argument is a locally unique identifier for the logged in user, commo
|
|
72
72
|
|
73
73
|
## Two-factor authentication
|
74
74
|
|
75
|
-
Two-factor authentication is available to your users out-of-the-box. By browsing to their
|
75
|
+
Two-factor authentication is available to your users out-of-the-box. By browsing to their security settings page, they're able to configure Google Authenticator and SMS settings, set up a backup phone number, and download their recovery codes.
|
76
76
|
|
77
77
|
The session token returned from `authenticate` indicates if two-factor authentication is required from the user once your application asks for it. You can do this immediately after you've called `authenticate`, or you can wait until later. You have complete control over what actions you when you want to require two-factor authentication, e.g. when logging in, changing account information, making a purchase etc.
|
78
78
|
|
@@ -116,15 +116,15 @@ rescue Userbin::Error => error
|
|
116
116
|
end
|
117
117
|
```
|
118
118
|
|
119
|
-
##
|
119
|
+
## User security settings
|
120
120
|
|
121
|
-
Every user has access to their security settings, which is a hosted page on Userbin. Here users can configure two-factor authentication, revoke suspicious sessions and set up notifications. The security page can be customized to fit your current layout by going to the appearance settings in your Userbin dashboard.
|
121
|
+
Every user has access to their security settings, which is a hosted page on Userbin. Here users can configure two-factor authentication, revoke suspicious sessions and set up notifications. The security settings page can be customized to fit your current layout by going to the appearance settings in your Userbin dashboard.
|
122
122
|
|
123
|
-
**Important:** Since the generated URL contains a Userbin session token that needs to be up-to-date, it's crucial that you don't use this helper directly in your HTML, but instead create a new route where you redirect to the security page.
|
123
|
+
**Important:** Since the generated URL contains a Userbin session token that needs to be up-to-date, it's crucial that you don't use this helper directly in your HTML, but instead create a new route where you redirect to the security settings page.
|
124
124
|
|
125
125
|
```ruby
|
126
126
|
get '/security'
|
127
|
-
redirect Userbin.
|
127
|
+
redirect Userbin.security_settings_url
|
128
128
|
end
|
129
129
|
```
|
130
130
|
|
data/lib/userbin/helpers.rb
CHANGED
data/lib/userbin/jwt.rb
CHANGED
@@ -11,7 +11,7 @@ module Userbin
|
|
11
11
|
@payload = ::JWT.decode(jwt, Userbin.config.api_secret, true) do |header|
|
12
12
|
@header = header.with_indifferent_access
|
13
13
|
Userbin.config.api_secret # used by the 'key finder' in the JWT gem
|
14
|
-
end.with_indifferent_access
|
14
|
+
end.first.with_indifferent_access
|
15
15
|
rescue ::JWT::DecodeError => e
|
16
16
|
raise Userbin::SecurityError.new(e)
|
17
17
|
end
|
data/lib/userbin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: userbin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 1.0.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 1.0.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: request_store
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|