googleauth 1.17.3 → 1.17.4

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: 7c73c744b267dbdafe6b4b3366fe629ca7f86774c6c56726b108f38ac3593ee7
4
- data.tar.gz: 2b5b379d5e8bc653a52d6dccb56b500904368a09955a3fe914efad7cf18147ce
3
+ metadata.gz: 80e7d42875ba60430bd7e7d19e7dfac71514b6da226506f7dab6dbc19a8cefa0
4
+ data.tar.gz: 0e863ef1dd4f84d84c7a7882982ac67231f811a29c5ba0dbb83fe2fe74477220
5
5
  SHA512:
6
- metadata.gz: 378ad3d1c7acb1118491dc2896f9983119197f888a8cf610998734cb48495dc2651d4cbb217eee46b10958cc9417cb06db790ca3a8ff52b5dcf9b6ba99fc24ce
7
- data.tar.gz: a7461765f075d468e2cc4cd8b237c82c3a0a140739bcec81ca452b9d5c633af4c8e7bf21acd099a4d713a20afbaf4ca7468868a16ca1d167939054b903ceca9b
6
+ metadata.gz: 1fa8c0bd685703caee6191860a57d1dfd9685d344175e7c08f3c63fce115ae3bf93b4d0f8b50147cdf5ef4c0b2a5b965fc6bfb0cb7b445cf3d84fabe5a122055
7
+ data.tar.gz: afc720473d4c6fb3e439b1695452977b56217dce473716506c89ec12cd134e2a0a17588e4ebdb2460cbcf113b89c22d0145001b282f3a7e090a831a1d3d95cb2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.17.4 (2026-08-13)
4
+
5
+ #### Documentation
6
+
7
+ * Update CLI/installed app example to use loopback IP redirect ([#589](https://github.com/googleapis/google-auth-library-ruby/issues/589))
8
+
3
9
  ### 1.17.3 (2026-07-27)
4
10
 
5
11
  #### Bug Fixes
data/README.md CHANGED
@@ -145,30 +145,32 @@ get('/oauth2callback') do
145
145
  end
146
146
  ```
147
147
 
148
- ### Example (Command Line) [Deprecated]
148
+ ### Example (Command Line / Installed App)
149
149
 
150
- The Google Auth OOB flow has been discontiued on January 31, 2023. The OOB flow is a legacy flow that is no longer considered secure. To continue using Google Auth, please migrate your applications to a more secure flow. For more information on how to do this, please refer to this [OOB Migration](https://developers.google.com/identity/protocols/oauth2/resources/oob-migration) guide.
150
+ Command line and desktop applications should use the Loopback IP redirect flow (`http://localhost`) as recommended in the [OOB Migration Guide](https://developers.google.com/identity/protocols/oauth2/resources/oob-migration).
151
151
 
152
152
  ```ruby
153
- require 'googleauth'
154
- require 'googleauth/stores/file_token_store'
153
+ require "googleauth"
154
+ require "googleauth/stores/file_token_store"
155
155
 
156
- OOB_URI = 'urn:ietf:wg:oauth:2.0:oob'
156
+ LOOPBACK_URI = "http://localhost"
157
157
 
158
- scope = 'https://www.googleapis.com/auth/drive'
159
- client_id = Google::Auth::ClientId.from_file('/path/to/client_secrets.json')
160
- token_store = Google::Auth::Stores::FileTokenStore.new(
161
- :file => '/path/to/tokens.yaml')
162
- authorizer = Google::Auth::UserAuthorizer.new(client_id, scope, token_store)
158
+ scope = "https://www.googleapis.com/auth/drive"
159
+ client_id = Google::Auth::ClientId.from_file "/path/to/client_secrets.json"
160
+ token_store = Google::Auth::Stores::FileTokenStore.new file: "/path/to/tokens.yaml"
161
+ authorizer = Google::Auth::UserAuthorizer.new client_id, scope, token_store
163
162
 
164
- user_id = ENV['USER']
165
- credentials = authorizer.get_credentials(user_id)
163
+ user_id = ENV["USER"]
164
+ credentials = authorizer.get_credentials user_id
166
165
  if credentials.nil?
167
- url = authorizer.get_authorization_url(base_url: OOB_URI )
168
- puts "Open #{url} in your browser and enter the resulting code:"
166
+ url = authorizer.get_authorization_url base_url: LOOPBACK_URI
167
+ puts "Open the following URL in your browser: #{url}"
168
+ puts "After authorizing, your browser will redirect to localhost with an authorization code."
169
+ puts "Enter the authorization code:"
169
170
  code = gets
170
171
  credentials = authorizer.get_and_store_credentials_from_code(
171
- user_id: user_id, code: code, base_url: OOB_URI)
172
+ user_id: user_id, code: code, base_url: LOOPBACK_URI
173
+ )
172
174
  end
173
175
 
174
176
  # OK to use credentials
@@ -16,6 +16,6 @@ module Google
16
16
  # Module Auth provides classes that provide Google-specific authorization
17
17
  # used to access Google APIs.
18
18
  module Auth
19
- VERSION = "1.17.3".freeze
19
+ VERSION = "1.17.4".freeze
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: googleauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.3
4
+ version: 1.17.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC