We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a189ee commit a18524cCopy full SHA for a18524c
1 file changed
server/routes/passport.routes.ts
@@ -1,10 +1,10 @@
1
-import Router from 'express';
+import { Router, Request, Response, NextFunction } from 'express';
2
import passport from 'passport';
3
4
const router = Router();
5
6
-const authenticateOAuth = (service) => (req, res, next) => {
7
- passport.authenticate(service, { failureRedirect: '/login' }, (err, user) => {
+const authenticateOAuth = (service: string) => (req: Request, res: Response, next: NextFunction) => {
+ passport.authenticate(service, { failureRedirect: '/login' }, (err: any, user: Express.User) => {
8
if (err) {
9
// use query string param to show error;
10
res.redirect(`/account?error=${service}`);
0 commit comments