omniauth-bolt 0.0.0 → 0.1.0

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: ef01fcc3c94ba30af520dd517366bfe075b6877cc27c58724e2325e7e6ac7915
4
- data.tar.gz: '080285b45ae56a4111d0ad2b7ff6f8915e6dbac3b4e9ee1dbb3d210202afb1d5'
3
+ metadata.gz: 510d07673008d52cf606747b16811930aec9549c0c4fa4c803a85658cf570598
4
+ data.tar.gz: a52f51df78199dba7ac9bd1c0842f422d658071e949102e1c8591a09472c10a1
5
5
  SHA512:
6
- metadata.gz: 3a1ce018932d2431c9f023b5d6c7c2f5db00f7257f97d583392288fc88ff858f931e7383dd23b2ce5087e6db4a2dcdd17efed2de1d21fdfb747dd5ad9c9b0e8b
7
- data.tar.gz: 646f8f4666b614019f9d963ba86cd79cd062b1608fb2a8db365479471e6653880e765dc570415b16917972b1f02b6fa9657b1431c1f6b7938d7bc96faee5d376
6
+ metadata.gz: be62452e096816d12917eeb1dd82cc2ae2d3e5af732f0c1867d2f7df31d4946eb5321950dab47093b9b69d34c47a76a621efdf6f192e21deb4e7aefa45ca7ad6
7
+ data.tar.gz: f995a83b838a2768ab92bb916f2611f2562eb5c527aab4af922970e14558dfd731c7f693a323cae54a1736942b097caeb516287aa914ff1feab7f154707ab861
@@ -31,10 +31,6 @@ module OmniAuth
31
31
  end
32
32
 
33
33
  def request_phase
34
- OmniAuth::Form.build(:title => options.title, :url => callback_path) do
35
- text_field 'Email', 'email'
36
- end.to_response
37
-
38
34
  session[:authorization_code] = request.params['authorization_code']
39
35
  session[:scope] = request.params['scope']
40
36
 
@@ -64,9 +60,17 @@ module OmniAuth
64
60
  post_data = URI.encode_www_form(payload)
65
61
  res = http.request(req, post_data)
66
62
  response = JSON.parse(res.body)
63
+
64
+ @expiration_time = Time.now.utc + response['expires_in']
65
+ @refresh_token = response['refresh_token']
66
+ @refresh_token_scope = response['refresh_token_scope']
67
67
  @access_token = response['access_token']
68
68
  @user_uid = response['id_token']
69
69
 
70
+ # don't need these values to refresh access_token so better remove them
71
+ session.delete('authorization_code')
72
+ session.delete('scope')
73
+
70
74
  super
71
75
  end
72
76
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Bolt
5
- VERSION = '0.0.0'
5
+ VERSION = '0.1.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniele Palombo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-10 00:00:00.000000000 Z
11
+ date: 2022-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth