diff options
| author | eeng5 <eleanor.eng5@gmail.com> | 2019-11-19 17:49:37 -0500 |
|---|---|---|
| committer | eeng5 <eleanor.eng5@gmail.com> | 2019-11-19 17:49:37 -0500 |
| commit | 7347f1eb7320e5e95f87c64b3222e4b4c1593be5 (patch) | |
| tree | 180b80e3f32cb8d9499d1f1568cdee593abf799c /src/server/authentication | |
| parent | f194abe2a54158bb041e1e0e7cfa6e22c669629f (diff) | |
| parent | 8b6f70cd0ddac6d2669c3b0624d59a866737497c (diff) | |
Merge branch 'server_refactor' of https://github.com/browngraphicslab/Dash-Web into server_refactor
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 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}`); |
