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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cdbc3c605fb145fe06f5586752132f09420cd82
4
- data.tar.gz: cc87e2c5709a7070d2102f51ea609cb489c7f00e
3
+ metadata.gz: 4c4998d7789d069fdc0593e1c812e683835662a9
4
+ data.tar.gz: e1e68fe884e676c1eee457360c3ad70a1016fbdc
5
5
  SHA512:
6
- metadata.gz: 5939b5a66eb93ac00db2bcfe573edd1c31c4f961f7d11cc510a83a0c6daf7a43d1646474d65b3772ec1237fa0119b0178c99aa4986ee24502b250a03b7fe7577
7
- data.tar.gz: d1cd8a693a8ae66770a497c34418452e31074ebbe1bb317d529155175c5ca02166885f404571c772bc66e270b863d99db5a33eca7f342b545af134312842e5a2
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 Security Page, they're able to configure Google Authenticator and SMS settings, set up a backup phone number, and download their recovery codes.
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
- ## Security page
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.security_page_url
127
+ redirect Userbin.security_settings_url
128
128
  end
129
129
  ```
130
130
 
@@ -69,7 +69,7 @@ module Userbin
69
69
  session.token
70
70
  end
71
71
 
72
- def security_page_url(session_token)
72
+ def security_settings_url(session_token)
73
73
  return '' unless session_token
74
74
  begin
75
75
  app_id = Userbin::JWT.new(session_token).app_id
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
@@ -1,3 +1,3 @@
1
1
  module Userbin
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
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.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.1.11
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.1.11
68
+ version: 1.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: request_store
71
71
  requirement: !ruby/object:Gem::Requirement