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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f763692f6d5b704c1b30c50a104d61283df33633e4009f6cb39ec4d25113f893
4
- data.tar.gz: 475275e8117238e9ff17b84917a8611a55d58e2da974d49d9dee0f24316a2d2c
3
+ metadata.gz: 3eef3dff3e7584c32ba66d772c82c8d615e3b454fdb7c089a36ebf8d09a05da6
4
+ data.tar.gz: d29178758eeab2e1b1ec0109c85adcafe26b010bce2a04b158852b4acaf836e5
5
5
  SHA512:
6
- metadata.gz: df00d71b19ba24ad523dbb7af3c29b63ac634376892b2ae3f098fbc1cd5b3924d6efcd8e992f91c5c83c7ce555e69ad3e54fba698360f5d0aaf38d522a744049
7
- data.tar.gz: 19f4f1662d54348a57d9525cd3d03a757e82f467b2556e59cb7752df81e88a48fb638872f4b0a1dbff6579546b6e13f300e0e9619fb37854acd824a4787a417c
6
+ metadata.gz: 33ebefd5bad10bf4b79487eec0676ebebdd2bb065271a9030008cec3512aa60af43a909d4feed11e0a4264f0b1d1a712d082f254a1fb407cfecf0c7c5a2ee2bc
7
+ data.tar.gz: b0780e05a9ce934d792e1422c3c4ba9dd9a8b590015569b7689ec07b18dc7750b4130994d4ab9c77a57ed60fe953109745aae01649f0cbda3319c93daee6e3e7
@@ -32,4 +32,4 @@ module Ibrain::Auth::Mutations
32
32
  )
33
33
  end
34
34
  end
35
- end
35
+ end
@@ -10,4 +10,4 @@ module Ibrain
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -11,6 +11,7 @@ module Ibrain
11
11
  argument :phone, String, required: false
12
12
  argument :job_id, ID, required: false
13
13
  argument :address, String, required: false
14
+ argument :password, String, required: false
14
15
  end
15
16
  end
16
17
  end
@@ -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 = is_social? ? firebase_verify : collection.ibrain_find(manual_params, available_columns)
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.firebase_aud_url,
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
@@ -4,14 +4,14 @@ module Ibrain
4
4
  # frozen_string_literal: true
5
5
 
6
6
  module Auth
7
- VERSION = '0.2.9'
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.2.8'
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.2.9
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 00:00:00.000000000 Z
11
+ date: 2022-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise-encryptable