ibrain-auth 0.3.17 → 0.3.19
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f37a4950b0e6847c3b794de0a8c9ab0b02a45ded4419ac6492858a09825ed171
|
4
|
+
data.tar.gz: f69f51c5a9d672e49238fa5a039d10cf2295b67968b6fa513125be2998a94a2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98b317409d15047ffddc9295aadb788344e2b81c3237fa60bacb0d633cdb5c16c43937b777c4f37949e35855833d2202610b30cb8aa0451fd8285082e3948971
|
7
|
+
data.tar.gz: 208492146cd89b13800f50d551cc628f5e640475e351b4ed6895798f96524100a67153f19ae0d62a39946ac94cfe1c32b18b175ce2e04fb928d9263511bd4b72
|
@@ -19,11 +19,11 @@ module Ibrain::Mutations
|
|
19
19
|
auth_resource.skip_confirmation! unless auth_resource.try(:confirmed?)
|
20
20
|
sign_in(resource_name, auth_resource)
|
21
21
|
@current_user = warden.authenticate!(auth_options)
|
22
|
-
|
22
|
+
|
23
23
|
if !current_user.try(:is_activated?) && Ibrain::Config.is_require_activated_account
|
24
24
|
raise ActionController::InvalidAuthenticityToken, I18n.t('ibrain.errors.account.is_deactivated')
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
warden.set_user(current_user)
|
28
28
|
current_user.jwt_token, jti = auth_headers(request, auth_resource)
|
29
29
|
current_user.jti = jti
|
@@ -15,11 +15,11 @@ module Ibrain::Mutations
|
|
15
15
|
auth_resource.skip_confirmation! unless auth_resource.try(:confirmed?)
|
16
16
|
sign_in(resource_name, auth_resource)
|
17
17
|
@current_user = warden.authenticate!(auth_options)
|
18
|
-
|
18
|
+
|
19
19
|
if !current_user.try(:is_activated?) && Ibrain::Config.is_require_activated_account
|
20
20
|
raise ActionController::InvalidAuthenticityToken, I18n.t('ibrain.errors.account.is_deactivated')
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
warden.set_user(current_user)
|
24
24
|
current_user.jwt_token, jti = auth_headers(request, auth_resource)
|
25
25
|
current_user.jti = jti
|
@@ -308,4 +308,7 @@ Devise.setup do |config|
|
|
308
308
|
# When set to false, does not sign a user in automatically after their password is
|
309
309
|
# changed. Defaults to true, so a user is signed in automatically after changing a password.
|
310
310
|
# config.sign_in_after_change_password = true
|
311
|
+
|
312
|
+
config.remember_for = 2.weeks
|
313
|
+
config.timeout_in = 2.weeks
|
311
314
|
end
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
Ibrain::Auth::Engine.routes.draw do
|
4
|
+
user_table_name = Ibrain::Auth::Config.user_table_name
|
5
|
+
|
6
|
+
return unless ActiveRecord::Base.connection.table_exists? user_table_name
|
7
|
+
|
4
8
|
devise_for(:users, {
|
5
9
|
class_name: Ibrain.user_class,
|
6
10
|
controllers: {
|
data/lib/ibrain/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibrain-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tai Nguyen Van
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|