aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Wilkins <35748010+samwilkins333@users.noreply.github.com>2019-11-19 16:34:20 -0500
committerSam Wilkins <35748010+samwilkins333@users.noreply.github.com>2019-11-19 16:34:20 -0500
commit855aa0e8b5b6e6b507973f91d22a3db9a6d0bf21 (patch)
tree40c1c4461de706e13982fd8e82130c2f70cb3968
parentcabb1c986be9a15cfb650fd365283557c1347737 (diff)
passport fix
-rw-r--r--src/server/authentication/config/passport.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/authentication/config/passport.ts b/src/server/authentication/config/passport.ts
index 0b15c3a36..726df7fd7 100644
--- a/src/server/authentication/config/passport.ts
+++ b/src/server/authentication/config/passport.ts
@@ -40,7 +40,7 @@ export let isAuthenticated = (req: Request, res: Response, next: NextFunction) =
export let isAuthorized = (req: Request, res: Response, next: NextFunction) => {
const provider = req.path.split("/").slice(-1)[0];
- if (_.find((req.user).tokens, { kind: provider })) {
+ if (_.find((req.user as any).tokens!, { kind: provider })) {
next();
} else {
res.redirect(`/auth/${provider}`);