ibrain-auth 0.3.5 → 0.3.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 131a35d1f5296b7ea35e0b3981136e836c2f0a7ad0fea72c9c2f3da8d0b7dc2a
4
- data.tar.gz: cd4eb62df7abd2ed22446dea6c45560f0aeb3c7ae19275698e8b874203fa4a32
3
+ metadata.gz: 0b5a9480e0e869679bf664237ce962ef17ff56ef7087251211bcd0d4ae28aee9
4
+ data.tar.gz: 43503cd8684a83261e76c7cbfd998edf29fb28f94afd13a7025c97e027012b9f
5
5
  SHA512:
6
- metadata.gz: bf1cd065dcc63b70d4b78dbb1f6f7f0c780cfda32879cc71cadc158eabb27db19f60e6d9c9e7c88adb5666df0381d03b06700ab1715e666619a10f5409e47537
7
- data.tar.gz: c31acc36e489945bc95028da8887cc7199a0c4b12caf22b3d8edbb1174a4de3962ec65e72d8a82a61f39b8c24541db2fe57ca609a44b29c2aff2c566772d9809
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
 
data/config/routes.rb CHANGED
@@ -8,5 +8,5 @@ Ibrain::Auth::Engine.routes.draw do
8
8
  path: "api/#{Ibrain::Config.api_version}/users",
9
9
  defaults: { format: :json }
10
10
 
11
- match "api/#{Ibrain::Config.api_version}/users/callback", to: 'sessions#callback', via: 'get'
11
+ get "api/#{Ibrain::Config.api_version}/users/callback" => 'sessions#callback'
12
12
  end
@@ -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.5'
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.5
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-11-30 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