Skip to content

Commit edf0a08

Browse files
authored
chore(authentication-oauth): Fix Express typings that got changed once again (#2378)
1 parent a43e7da commit edf0a08

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎packages/authentication-oauth/src/express.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import grant from 'grant';
22
import session from 'express-session';
3+
import { Request, Response, NextFunction } from 'express';
34
import { createDebug } from '@feathersjs/commons';
45
import { Application } from '@feathersjs/feathers';
56
import { AuthenticationResult } from '@feathersjs/authentication';
@@ -44,7 +45,7 @@ export default (options: OauthSetupSettings) => {
4445

4546
authApp.use(expressSession);
4647

47-
authApp.get('/:name', (req, _res, next) => {
48+
authApp.get('/:name', (req: Request, _res: Response, next: NextFunction) => {
4849
const { feathers_token, redirect, ...query } = req.query;
4950

5051
if (feathers_token) {
@@ -57,7 +58,7 @@ export default (options: OauthSetupSettings) => {
5758
next()
5859
});
5960

60-
authApp.get('/:name/authenticate', async (req, res, next) => {
61+
authApp.get('/:name/authenticate', async (req: Request, res: Response, next: NextFunction) => {
6162
const { name } = req.params ;
6263
const { accessToken, grant, query = {}, redirect } = req.session;
6364
const service = app.defaultAuthentication(authService);
@@ -103,7 +104,7 @@ export default (options: OauthSetupSettings) => {
103104
resolve();
104105
}
105106

106-
req.session.destroy(err => err ? reject(err) : resolve());
107+
req.session.destroy((err: any) => err ? reject(err) : resolve());
107108
});
108109

109110
debug(`Calling ${authService}.create authentication with strategy ${name}`);

0 commit comments

Comments
 (0)