diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-22 17:16:18 -0400 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-22 17:16:18 -0400 |
| commit | f82458be8bc8beaab387cc2813b7b18c9b3caac2 (patch) | |
| tree | 4d547ad7f2623257cc585e16df17c05c8979e06a /src/server/authentication/config/passport.ts | |
| parent | f529d7d22162689c08830418da67a89778111e16 (diff) | |
initial commit post master merge
Diffstat (limited to 'src/server/authentication/config/passport.ts')
| -rw-r--r-- | src/server/authentication/config/passport.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/authentication/config/passport.ts b/src/server/authentication/config/passport.ts index 8b20d29b1..f69b274d3 100644 --- a/src/server/authentication/config/passport.ts +++ b/src/server/authentication/config/passport.ts @@ -42,7 +42,7 @@ export let isAuthorized = (req: Request, res: Response, next: NextFunction) => { const provider = req.path.split("/").slice(-1)[0]; if (req.user) { - if (_.find((req.user as any).tokens, { kind: provider })) { + if (_.find(req.user.tokens, { kind: provider })) { next(); } else { res.redirect(`/auth/${provider}`); |
