diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-10-09 22:48:00 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-10-09 22:48:00 -0400 |
commit | 2cc7ca6b267d9dd6b1683d59b6966a021339bc18 (patch) | |
tree | b4c746accc1c6203d0f459f45e8dabdb88e401a3 /src/server/authentication | |
parent | 5c2d46f7cb064f579bde1e17af91271b31440310 (diff) |
fixed compile errors and exceptions
Diffstat (limited to 'src/server/authentication')
-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 d42741410..e87b93ddf 100644 --- a/src/server/authentication/config/passport.ts +++ b/src/server/authentication/config/passport.ts @@ -42,7 +42,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}`); |