Skip to content

Commit bb73670

Browse files
committed
auth: prepare v2 release
Fixes #671
1 parent 76d3da3 commit bb73670

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

googleapis_auth/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 2.0.0-wip
1+
## 2.0.0
22

33
- Removed deprecated `RefreshFailedException`.
44
- Removed deprecated `auth.dart` library.

googleapis_auth/README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,10 @@ After the Client ID has been created, you can obtain access credentials via
4848
import 'package:googleapis_auth/auth_browser.dart';
4949
5050
// Initialize the browser oauth2 flow functionality then use it to obtain credentials.
51-
Future<AccessCredentials> obtainCredentials() async {
52-
final flow = await createImplicitBrowserFlow(
53-
ClientId('....apps.googleusercontent.com'),
54-
['scope1', 'scope2'],
55-
);
56-
57-
try {
58-
return await flow.obtainAccessCredentialsViaUserConsent();
59-
} finally {
60-
flow.close();
61-
}
62-
}
51+
Future<AccessCredentials> obtainCredentials() => requestAccessCredentials(
52+
clientId: '....apps.googleusercontent.com',
53+
scopes: ['scope1', 'scope2'],
54+
);
6355
```
6456

6557
or obtain an authenticated HTTP client via
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import 'package:googleapis_auth/auth_browser.dart';
2+
3+
// Initialize the browser oauth2 flow functionality then use it to obtain credentials.
4+
Future<AccessCredentials> obtainCredentials() => requestAccessCredentials(
5+
clientId: '....apps.googleusercontent.com',
6+
scopes: ['scope1', 'scope2'],
7+
);

googleapis_auth/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: googleapis_auth
2-
version: 2.0.0-wip
2+
version: 2.0.0
33
description: Obtain Access credentials for Google services using OAuth 2.0
44
repository: https://github.com/google/googleapis.dart/tree/master/googleapis_auth
55

0 commit comments

Comments
 (0)