ibrain-auth 0.2.9 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/graphql/ibrain/auth/mutations/generate_firebase_token_mutation.rb +1 -1
- data/app/graphql/ibrain/auth/types/input/generate_firebase_token_input.rb +1 -1
- data/app/graphql/ibrain/auth/types/input/sign_up_input.rb +1 -0
- data/app/models/ibrain/auth/user.rb +1 -1
- data/app/repositories/auth_repository.rb +3 -3
- data/app/repositories/firebase_repository.rb +2 -2
- data/lib/ibrain/auth/version.rb +2 -2
- 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: 3eef3dff3e7584c32ba66d772c82c8d615e3b454fdb7c089a36ebf8d09a05da6
|
4
|
+
data.tar.gz: d29178758eeab2e1b1ec0109c85adcafe26b010bce2a04b158852b4acaf836e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33ebefd5bad10bf4b79487eec0676ebebdd2bb065271a9030008cec3512aa60af43a909d4feed11e0a4264f0b1d1a712d082f254a1fb407cfecf0c7c5a2ee2bc
|
7
|
+
data.tar.gz: b0780e05a9ce934d792e1422c3c4ba9dd9a8b590015569b7689ec07b18dc7750b4130994d4ab9c77a57ed60fe953109745aae01649f0cbda3319c93daee6e3e7
|
@@ -9,7 +9,7 @@ module Ibrain
|
|
9
9
|
|
10
10
|
self.table_name = Ibrain::Auth::Config.user_table_name
|
11
11
|
|
12
|
-
devise :database_authenticatable, :registerable,
|
12
|
+
devise :database_authenticatable, :registerable, :confirmable,
|
13
13
|
:recoverable, :validatable, :timeoutable,
|
14
14
|
:jwt_authenticatable, jwt_revocation_strategy: self
|
15
15
|
|
@@ -11,9 +11,9 @@ class AuthRepository < Ibrain::BaseRepository
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def create
|
14
|
-
user =
|
14
|
+
user = collection.new(provider: 'manual')
|
15
15
|
user.assign_attributes(normalize_params.except(:id_token))
|
16
|
-
user.save
|
16
|
+
user.save!
|
17
17
|
|
18
18
|
user
|
19
19
|
end
|
@@ -86,7 +86,7 @@ class AuthRepository < Ibrain::BaseRepository
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def permitted_attributes
|
89
|
-
Ibrain.user_class.permitted_attributes.reject { |k| permintted_columns.include?(k) }.map(&:to_sym).concat([:id_token])
|
89
|
+
Ibrain.user_class.permitted_attributes.reject { |k| permintted_columns.include?(k) }.map(&:to_sym).concat([:id_token]).concat([:password])
|
90
90
|
end
|
91
91
|
|
92
92
|
def permintted_columns
|
@@ -14,7 +14,7 @@ class FirebaseRepository < Ibrain::BaseRepository
|
|
14
14
|
payload = {
|
15
15
|
iss: firebase_owner_email,
|
16
16
|
sub: firebase_owner_email,
|
17
|
-
aud: Ibrain::Auth::Config.
|
17
|
+
aud: Ibrain::Auth::Config.firebase_auth_url,
|
18
18
|
iat: now,
|
19
19
|
exp: now + 3600,
|
20
20
|
uid: params[:uid],
|
@@ -38,4 +38,4 @@ class FirebaseRepository < Ibrain::BaseRepository
|
|
38
38
|
def private_key
|
39
39
|
OpenSSL::PKey::RSA.new json_firebase[:private_key]
|
40
40
|
end
|
41
|
-
end
|
41
|
+
end
|
data/lib/ibrain/auth/version.rb
CHANGED
@@ -4,14 +4,14 @@ module Ibrain
|
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
6
|
module Auth
|
7
|
-
VERSION = '0.
|
7
|
+
VERSION = '0.3.1'
|
8
8
|
|
9
9
|
def self.ibrain_auth_version
|
10
10
|
VERSION
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.previous_ibrain_auth_minor_version
|
14
|
-
'0.
|
14
|
+
'0.3.0'
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.ibrain_auth_gem_version
|
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.
|
4
|
+
version: 0.3.1
|
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: 2022-10-
|
11
|
+
date: 2022-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise-encryptable
|