ibrain-auth 0.3.16 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/graphql/ibrain/mutations/sign_in_mutation.rb +4 -0
- data/app/graphql/ibrain/mutations/social_sign_in_mutation.rb +4 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/ja.yml +2 -1
- data/config/locales/vi.yml +1 -0
- data/config/routes.rb +4 -0
- data/lib/ibrain/auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '049d14fa1a01ad65da1f87ae5cc53495874a42227d05861e908e9690f82a4fbc'
|
4
|
+
data.tar.gz: 7df78b2220c49b8d4d974be4f23b9fb7c3f0848c7fc2e4c80ed8256af76611cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df3bb4ea3b6cdf9efe177ab5619f282a00a9c9d5eee709e65f9e54b519c34898cc51c719258c1fcac6f9023a90a8c6273e71898f110185f8f8d90d985e0bba33
|
7
|
+
data.tar.gz: d259e5aa8cb48db4e51e73916f9cfdafba1eace1fdd0c8616ae700d8c19171c93a96430ba4697bdb45f3d61a13d0fbea8c63009c6484773280facd8a0178bf3d
|
@@ -20,6 +20,10 @@ module Ibrain::Mutations
|
|
20
20
|
sign_in(resource_name, auth_resource)
|
21
21
|
@current_user = warden.authenticate!(auth_options)
|
22
22
|
|
23
|
+
if !current_user.try(:is_activated?) && Ibrain::Config.is_require_activated_account
|
24
|
+
raise ActionController::InvalidAuthenticityToken, I18n.t('ibrain.errors.account.is_deactivated')
|
25
|
+
end
|
26
|
+
|
23
27
|
warden.set_user(current_user)
|
24
28
|
current_user.jwt_token, jti = auth_headers(request, auth_resource)
|
25
29
|
current_user.jti = jti
|
@@ -16,6 +16,10 @@ module Ibrain::Mutations
|
|
16
16
|
sign_in(resource_name, auth_resource)
|
17
17
|
@current_user = warden.authenticate!(auth_options)
|
18
18
|
|
19
|
+
if !current_user.try(:is_activated?) && Ibrain::Config.is_require_activated_account
|
20
|
+
raise ActionController::InvalidAuthenticityToken, I18n.t('ibrain.errors.account.is_deactivated')
|
21
|
+
end
|
22
|
+
|
19
23
|
warden.set_user(current_user)
|
20
24
|
current_user.jwt_token, jti = auth_headers(request, auth_resource)
|
21
25
|
current_user.jti = jti
|
data/config/locales/en.yml
CHANGED
data/config/locales/ja.yml
CHANGED
@@ -7,10 +7,11 @@ ja:
|
|
7
7
|
errors:
|
8
8
|
session:
|
9
9
|
invalid_session: 無効なログインセッション。 もう一度やり直してください!
|
10
|
-
expired_session: ログインセッションが期限切れになりました。
|
10
|
+
expired_session: ログインセッションが期限切れになりました。
|
11
11
|
account:
|
12
12
|
not_found: アカウントが見つかりません
|
13
13
|
incorrect: ユーザー名またはパスワードが正しくありません!
|
14
14
|
not_verified: ログインする前にアカウントを確認してください
|
15
|
+
is_deactivated: このアカウントは無効です。
|
15
16
|
custom_token:
|
16
17
|
not_retrieve_uid: uid を取得できません
|
data/config/locales/vi.yml
CHANGED
@@ -12,5 +12,6 @@ vi:
|
|
12
12
|
not_found: Không tìm thấy tài khoản
|
13
13
|
incorrect: Tài khoản hoặc mật khẩu không chính xác!
|
14
14
|
not_verified: Vui lòng xác minh tài khoản của bạn trước khi đăng nhập
|
15
|
+
is_deactivated: Tài khoản chưa được xác thực.
|
15
16
|
custom_token:
|
16
17
|
not_retrieve_uid: Lấy thông tin uid của người dùng thất bại
|
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.18
|
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-
|
11
|
+
date: 2023-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|