googleauth 1.17.3 → 1.17.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 +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +23 -21
- data/lib/googleauth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af06c8e4a1a2a758704e949f6bcfa3d885bf8a6cd078a82ac02e0c679a5a3069
|
|
4
|
+
data.tar.gz: 198ac2cadd8776c53c75b81d88555c9269c42e4be5a2e491ddd5751926d44c50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 224efb177a6728032f30e5cb09680f3aef19d52d260632f03c3ed84153dc302911b7bd89d06523ead8bd01389bc43ef1b95ee2b126df4ef4f39235b2c6d3ec17
|
|
7
|
+
data.tar.gz: d99977881c06e569b1e1bb194f590fcca5516372e69841986f8e16a1bcd8e3bf40a973f4818b740e5f2e6f4ce373f029fed12def6a1cdd26390e4b5f32a7fa12
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### 1.17.7 (2026-10-23)
|
|
4
|
+
|
|
5
|
+
#### Documentation
|
|
6
|
+
|
|
7
|
+
* link to the published Ruby version support policy ([#605](https://github.com/googleapis/google-auth-library-ruby/issues/605))
|
|
8
|
+
|
|
9
|
+
### 1.17.6 (2026-10-14)
|
|
10
|
+
|
|
11
|
+
#### Documentation
|
|
12
|
+
|
|
13
|
+
* Fix broken links and remove obsolete instructions ([#553](https://github.com/googleapis/google-auth-library-ruby/issues/553))
|
|
14
|
+
|
|
15
|
+
### 1.17.5 (2026-10-13)
|
|
16
|
+
|
|
17
|
+
#### Documentation
|
|
18
|
+
|
|
19
|
+
* trigger a release to verify the new publishing pipeline ([#601](https://github.com/googleapis/google-auth-library-ruby/issues/601))
|
|
20
|
+
|
|
21
|
+
### 1.17.4 (2026-08-13)
|
|
22
|
+
|
|
23
|
+
#### Documentation
|
|
24
|
+
|
|
25
|
+
* Update CLI/installed app example to use loopback IP redirect ([#589](https://github.com/googleapis/google-auth-library-ruby/issues/589))
|
|
26
|
+
|
|
3
27
|
### 1.17.3 (2026-07-27)
|
|
4
28
|
|
|
5
29
|
#### Bug Fixes
|
data/README.md
CHANGED
|
@@ -145,30 +145,32 @@ get('/oauth2callback') do
|
|
|
145
145
|
end
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
### Example (Command Line)
|
|
148
|
+
### Example (Command Line / Installed App)
|
|
149
149
|
|
|
150
|
-
|
|
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
|
|
154
|
-
require
|
|
153
|
+
require "googleauth"
|
|
154
|
+
require "googleauth/stores/file_token_store"
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
LOOPBACK_URI = "http://localhost"
|
|
157
157
|
|
|
158
|
-
scope =
|
|
159
|
-
client_id = Google::Auth::ClientId.from_file
|
|
160
|
-
token_store = Google::Auth::Stores::FileTokenStore.new
|
|
161
|
-
|
|
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[
|
|
165
|
-
credentials = authorizer.get_credentials
|
|
163
|
+
user_id = ENV["USER"]
|
|
164
|
+
credentials = authorizer.get_credentials user_id
|
|
166
165
|
if credentials.nil?
|
|
167
|
-
url = authorizer.get_authorization_url
|
|
168
|
-
puts "Open
|
|
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:
|
|
172
|
+
user_id: user_id, code: code, base_url: LOOPBACK_URI
|
|
173
|
+
)
|
|
172
174
|
end
|
|
173
175
|
|
|
174
176
|
# OK to use credentials
|
|
@@ -267,12 +269,10 @@ Custom storage implementations can also be used. See
|
|
|
267
269
|
|
|
268
270
|
This library is supported on Ruby 3.2+.
|
|
269
271
|
|
|
270
|
-
Google provides official support for Ruby versions
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
|
275
|
-
support schedule.
|
|
272
|
+
Google provides official support for Ruby versions as described in the
|
|
273
|
+
[Supported Ruby versions](https://docs.cloud.google.com/ruby/getting-started/supported-ruby-versions)
|
|
274
|
+
policy. Older versions of Ruby _may_ still work, but are unsupported and not
|
|
275
|
+
recommended.
|
|
276
276
|
|
|
277
277
|
## License
|
|
278
278
|
|
|
@@ -292,4 +292,6 @@ hesitate to
|
|
|
292
292
|
about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
|
293
293
|
|
|
294
294
|
[application default credentials]: https://cloud.google.com/docs/authentication/provide-credentials-adc
|
|
295
|
+
[contributing]: https://github.com/googleapis/google-auth-library-ruby/blob/main/.github/CONTRIBUTING.md
|
|
295
296
|
[license]: https://github.com/googleapis/google-auth-library-ruby/tree/main/LICENSE
|
|
297
|
+
|
data/lib/googleauth/version.rb
CHANGED