You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,35 @@
1
1
# Change Log
2
+
2
3
All notable changes to this project will be documented in this file.
3
4
This project adheres to [Semantic Versioning](http://semver.org/).
4
5
5
6
## [2.0.1] - 2020-12-02
7
+
6
8
### Updated
9
+
7
10
- Update dependencies and test against node 14.
8
11
9
12
## [2.0.0] - 2020-03-25
13
+
10
14
### Breaking
15
+
11
16
- Drop support for node < 10.
12
17
13
18
## [1.1.0] - 2018-06-06
19
+
14
20
### Added
21
+
15
22
- Support using a strategy which overrides the `getOAuthAccessToken` function, for example the Reddit or Spotify strategy. #10
16
23
17
24
## [1.0.0] - 2015-12-17
25
+
18
26
### Added
27
+
19
28
- Allow extra params to be sent when requesting access token.
20
29
- Use embedded `_oauth2` constructor to create new OAuth2 instance, to support instances where the `_oauth2` object is using a custom implementation.
21
30
22
31
### Removed
32
+
23
33
- Dropped peerDependency on `oauth2` library, in favour of using the `_oauth2` object exposed by passport.
24
34
- Dropped support for node.js 0.6 and 0.8, lowest supported version is now 0.10. _If you still need support for 0.6 or 0.8, please continue to use v0.4.0 of this module._
25
35
@@ -28,35 +38,51 @@ This project adheres to [Semantic Versioning](http://semver.org/).
28
38
The move from 0.4 to 1.0 is non-breaking, _unless_ you are using a version of node.js lower than 0.10. In this case, you should stick to using 0.4. Otherwise, you can safely upgrade with no code changes required.
29
39
30
40
## [0.4.0] - 2015-04-01
41
+
31
42
### Added
43
+
32
44
- Allow strategy to be added with an explicit name: `refresh.use(name, strategy)`.
33
45
34
46
## [0.3.1] - 2015-03-06
47
+
35
48
### Changed
49
+
36
50
- Removed peer dependency on passport-oauth2, to fix npm 3 warning.
37
51
38
52
## [0.3.0] - 2015-01-27
53
+
39
54
### Added
55
+
40
56
- Support strategies which use separate URLs for generating and refreshing tokens (e.g. `passport-echosign`).
// You have a new access token, store it in the user object,
55
-
// or use it to make a new request.
56
-
// `refreshToken` may or may not exist, depending on the strategy you are using.
57
-
// You probably don't need it anyway, as according to the OAuth 2.0 spec,
58
-
// it should be the same as the initial refresh token.
59
-
60
-
});
61
-
53
+
refresh.requestNewAccessToken(
54
+
'facebook',
55
+
'some_refresh_token',
56
+
function (err, accessToken, refreshToken) {
57
+
// You have a new access token, store it in the user object,
58
+
// or use it to make a new request.
59
+
// `refreshToken` may or may not exist, depending on the strategy you are using.
60
+
// You probably don't need it anyway, as according to the OAuth 2.0 spec,
61
+
// it should be the same as the initial refresh token.
62
+
},
63
+
);
62
64
```
63
65
64
66
### Specific name
65
67
66
68
Instead of using the default `strategy.name`, you can setup `passport-oauth2-refresh` to use an specific name instead.
67
69
68
-
```js
70
+
```js
69
71
// Setup
70
72
passport.use('gmail', googleStrategy);
71
73
@@ -79,7 +81,7 @@ This can be useful if you'd like to reuse strategy objects but under a different
79
81
80
82
Some endpoints require additional parameters to be sent when requesting a new access token. To send these parameters, specify the parameters when calling `requestNewAccessToken` as follows:
0 commit comments