ibrain-auth 0.3.6 → 0.3.7

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: 14ed64fc589a65550a730c8cf6a0fd809380d0fa09c4b2921035a945075aa268
4
- data.tar.gz: 99c94235da4cca32eecaffe15d8ddaf9ddc63c406cc6d62b3655cfaaf992b560
3
+ metadata.gz: 0b5a9480e0e869679bf664237ce962ef17ff56ef7087251211bcd0d4ae28aee9
4
+ data.tar.gz: 43503cd8684a83261e76c7cbfd998edf29fb28f94afd13a7025c97e027012b9f
5
5
  SHA512:
6
- metadata.gz: 44d8fe3cee0f97d194303d06bf8524332f50bdf7a738f35eccfdd35b456acaded077b123b172ea74728a18e2e8a7003ab90da607a71ea45c114538484e12b23e
7
- data.tar.gz: 97e262952e408ce4e0c3e056dc0e87ce2124a418642d6f9818aa9d3a7d94d8beeb9d973b00863eb58ab76ea4a617e688a2a03cc8cc42937028413da3ec5374ec
6
+ metadata.gz: 478b379d0d48a0e166301146009c1e167205f30cc40007df80f88d26357887866fd25be95c5b534e287acc7e899cce8380fd6a2130ec0671230ef4e9526f113d
7
+ data.tar.gz: d90a560cdab976bae3615509d29b77d958aeaec107b748b20157db953407cd241417acf1915a30fd001055b60e28602161fb62f75c80db2dd51c7f85357c7f75
@@ -7,7 +7,7 @@ module Ibrain::Auth::Mutations
7
7
  field :result, Boolean, null: true
8
8
  field :is_verified, Boolean, null: true
9
9
 
10
- argument :id_token, String, description: 'Id Token from firebase', required: true
10
+ argument :attributes, Ibrain::Auth::Config.social_sign_in_input, required: true
11
11
  argument :device_token, String, description: 'Device token for notificaiton', required: false
12
12
 
13
13
  def resolve(args)
@@ -40,8 +40,8 @@ module Ibrain::Auth::Mutations
40
40
 
41
41
  private
42
42
 
43
- def normalize_parameters(args)
44
- ActionController::Parameters.new(args.as_json)
43
+ def normalize_parameters
44
+ attribute_params
45
45
  rescue StandardError
46
46
  ActionController::Parameters.new({})
47
47
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ibrain
4
+ module Auth
5
+ module Types
6
+ module Input
7
+ class SocialSignInInput < Ibrain::Types::BaseInputObject
8
+ argument :id_token, String, description: 'Id Token from firebase', required: true
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -6,7 +6,7 @@ module Ibrain
6
6
  attr_accessor :jwt_token
7
7
 
8
8
  include Devise::JWT::RevocationStrategies::JTIMatcher
9
-
9
+
10
10
  self.abstract_class = true
11
11
  self.table_name = Ibrain::Auth::Config.user_table_name
12
12
 
@@ -25,4 +25,7 @@ Ibrain::Auth.config do |config|
25
25
 
26
26
  # firebase owner email
27
27
  config.firebase_owner_email = nil
28
+
29
+ # social sign_in input
30
+ config.social_sign_in_input = Ibrain::Auth::Types::Input::SocialSignInInput
28
31
  end
@@ -4,7 +4,7 @@ module Ibrain
4
4
  # frozen_string_literal: true
5
5
 
6
6
  module Auth
7
- VERSION = '0.3.6'
7
+ VERSION = '0.3.7'
8
8
 
9
9
  def self.ibrain_auth_version
10
10
  VERSION
@@ -26,5 +26,7 @@ module Ibrain
26
26
 
27
27
  # firebase owner email
28
28
  preference :firebase_owner_email, :string, default: nil
29
+
30
+ preference :social_sign_in_input, :class, default: Ibrain::Auth::Types::Input::SocialSignInInput
29
31
  end
30
32
  end
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.6
4
+ version: 0.3.7
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-12-01 00:00:00.000000000 Z
11
+ date: 2022-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
@@ -216,6 +216,7 @@ files:
216
216
  - app/graphql/ibrain/auth/types/input/generate_firebase_token_input.rb
217
217
  - app/graphql/ibrain/auth/types/input/sign_in_input.rb
218
218
  - app/graphql/ibrain/auth/types/input/sign_up_input.rb
219
+ - app/graphql/ibrain/auth/types/input/social_sign_in_input.rb
219
220
  - app/models/ibrain/auth/user.rb
220
221
  - app/repositories/auth_repository.rb
221
222
  - app/repositories/firebase_repository.rb