Skip to content

Commit acd1e7e

Browse files
committed
Correct error type in authentication test and update comments for clarity
1 parent 297c56f commit acd1e7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/strategies/oauth2.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe(OAuth2Strategy.name, () => {
135135
);
136136

137137
expect(strategy.authenticate(request)).rejects.toThrowError(
138-
new ReferenceError("State in URL doesn't match state in cookie."),
138+
new RangeError("State in URL doesn't match state in cookie."),
139139
);
140140
});
141141

src/strategies/oauth2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class OAuth2Strategy<SessionData> extends Strategy<
209209
}
210210

211211
/**
212-
* Users the token revocation endpoint of the identity provider to revoke the
212+
* Uses the token revocation endpoint of the identity provider to revoke the
213213
* access token and make it invalid.
214214
*
215215
* @param token The access token to revoke
@@ -235,7 +235,7 @@ export class OAuth2Strategy<SessionData> extends Strategy<
235235
*
236236
* @param uri The URI of the issuer, this can be a full URL or just the domain
237237
* @param options The rest of the options to pass to the OAuth2Strategy constructor, clientId, clientSecret, redirectURI, and scopes are required.
238-
* @param callback The verify function to use with the OAuth2Strategy instance
238+
* @param callback The callback function to use with the OAuth2Strategy instance
239239
* @returns A new OAuth2Strategy instance
240240
* @example
241241
* ```ts

0 commit comments

Comments
 (0)