[passport-oauth2] Allows callbackURL option to be omitted in constructor of OAuth2Strategy (#28907)

* [passport-oauth2] callbackURL is an optional value

The implementation for this OAuth2Strategy handles `callbackURL` being undefined, so this more accurately describes the interface.

* Making at least one test case use no callbackURL
This commit is contained in:
Ankur Oberoi
2018-09-17 00:41:54 -07:00
committed by Ryan Cavanaugh
parent 9061b19a3c
commit 696e5f2e10
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ declare namespace OAuth2Strategy {
tokenURL: string;
clientID: string;
clientSecret: string;
callbackURL: string;
callbackURL?: string;
}
interface StrategyOptions extends _StrategyOptionsBase {
passReqToCallback?: false;
@@ -33,7 +33,6 @@ function verifyFunction4(_req: Request, _accessToken: string, _refreshToken: str
const strategyOptions2: StrategyOptionsWithRequest = {
authorizationURL: 'http://www.example.com/auth',
callbackURL: 'http://www.example.com/callback',
clientID: 'dummy',
clientSecret: 'secret',
tokenURL: 'http://www.example.com/token',